On my flow I want to check if a switch in my home is on.
The switch send event ON or OFF once its triggered.
How should I do that ? write that even to variable and check the variable ? will this variable reset on each deployment ?
What i'm trying to do is check if lights needed with sun elevation, if dark enough, check if lights already on manually by wall switch, if not, turn them on.
So I need to be able to determine if lights are on already, I can't check them becuase they report on MQTT once and do not keep state.