My roof opening is controlled by a switch node checking the inside temperature and windspeed.
Thats all working great.
But sometimes I need to overwrite the value if I see a storm coming or etc.
To avoid the automation overriding afterwards I check an input boolean called “Roof automatic”
In the automation this one gets checked before setting the roof position.
The downside is not to forget to switch the automatic boolean off when correcting the roof manualy.
Now I am looking how I can find out if the position of the roof is done manually or automatic.
I attached the debug node to an eventstate node but it only gives me the value, no further details what or how it was triggered but I remember reading it should be possible somehow.
Open the debug node and change the setting to complete message object for a verbose output. If you don’t find what you are looking for in the message please post your flow.
I use a Change Node to look at msg.data.new_state.context.user_id to determine if a switch was changed by a user or an automation. In the Change Node I check for each of my 3 user ID’s. Go to Settings - People - Users to get the ID’s. If the msg.data wasn’t generated by one of my 3 ID’s it must have been initiated by an automation.