New to node Red so haven’t yet worked out how to do this…
I have an automation I setup which tracks where my iphone is using owntracks. When I leave the house it will turn off the light in the hallway if it is switched on. When I come home and if its after the sun has gone down the light will turn on.
Problem I am facing is that I am using an events: state node which is watching my iphone for state changes. The light is turning on and off as it should be. I also have a push notification setup which tells me that the event has triggered.
Every 5 minutes or so or when owntracks pushes a new location to HA, Node Red picks up on it and i’m getting a “Left Home” notification each time. So it seems that even though i’m already away from home, when a new location update is pushed to HA the “AWAY” status is updated as well to “AWAY” again, even if its already set to away. Node red seems to pick up on this change and keeps triggering the automation.
Is there a way to setup an event trigger that is set to trigger if my iphone state goes from “home” to “away” then that will stop it from constantly firing? That’s how I used to have it setup with HA automation’s, but moving to node red I haven’t worked out how to do this?
Can anyone help?