I have an issue that hoping someone can help. I have a flow that contains both my Mrs and I iPhone as trackers. Lets say if home turn a simple light on. However lets say once we are home we turn off the lamp it seems like the flow is constantly detecting we are home and turning the light back on. Is there away to only have the flow run once when we are home?
I came downstairs to all my lights and plugs on that i want when i arrive home this morning.
Before acting on the message - first check msg.data.event.old_state.state to see whether it is actually different to msg.payload
This way if the previous state was not_home and the new state is home then you know that the state has actually changed, but if the previous state is home and the new state is home, then you can just set msg to null and the flow will stop.