Entity could not be found in cache

I'm running NR in Home Assistant. I'm trying to set up a flow that will check if we're home at a specific time during the day, and if we are, turn on a light. I've configured current state nodes to check the locations of our phones, but they keep throwing an error whenever I try to run the flow. The only debug message I've been able to get from it is "Entity could not be found in cache." The googling I've done suggests that the flow is running before Node Red connects to the Home Assistant server, however I have the "delay connection attempts" option set in HA's server settings, so I'm not sure why it's giving me this. I even tried manually setting a delay node in the flow as well, and also turning off the "delay connection" option in the HA server while keeping the delay node. So I've been fiddling with it for a while now with no joy-- does anyone know how to fix this error?

I'm not a coder by any means, and pretty new to node red in general.

I actually found the fix to this. Part of the problem is that I was doing a full deployment in Node Red instead of deploying only nodes that had been changed. The other thing I added was a ten second delay between the inject and the current state node. My inject was set to check our locations at 6pm, then turn on the lights if either of us was home (but do nothing if neither of us is home). That ten second delay gave it enough time to connect to the server if I did a full deployment-- previously I had only done a 5 second delay and that wasn't enough.
This and this gave me enough of a clue to figure out to add a longer delay.

I hope this helps anyone else dealing with this in the future!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.