Node Red entity previous state

Morning all,

I have created a nodered flow based on my location and want it to trigger when I transition from a certain distance away but I am receiving an error and hoping someone can assist please.

Here is the node to look at location and error messages:

Thank you in advance!

In the two conditions where you have “< 4” and “>= 4”, you have them set to be string comparisons (az) rather than numeric (09). I haven’t tested, but worth trying to see if it fixes the problem.