Getting to know Node-Red and it's integration with HE. I am trying to work on a flow where it checks the state of a switch/light and then a switch node either stops if the light is already on or continues to turn the light on. I have used the device node which shows the state, but if I continue the flow and turn that light on, then the state changes in the device node and causes a loop that flicks the light on and off for ever until i remove the nodes and redeploy. Is there a way to capture the state of the light when the flow is started and not change it when the light goes on? Or am I thinking badly and missing something simple? or have I got a bug?
This is my flow: