I am pretty new to HA and have done most of my stuff using Node Red, but I have recently created a dashboard switch which I use to toggle my hot water on and off. This works, but if you turn the hot water on manually, then my automatic schedule to turn the hot water on also fires, and then turns it off - the switch will remain at “on” position, even though the water has actually been turned off.
So, I am looking to create an automation that just waits for the state of the hot water to change from on to off, then changes the switch position. The trigger on the automation fires, but I can’t figure out how to actually change the state on the dashboard switch. I’m sure its pretty simple… any help appreciated.
This is the yaml:
alias: FlipHotWaterSwitch
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.hot_water_power
from: "on"
to: "off"
condition: []
action:
- condition: state
entity_id: switch.nodered_a6ad9655bc80b367
state: "off"
mode: single
As you said you are learning. This can be confusing in the beginning - now that I think about it, the docs are not that well sorted to that regard. You should bookmark these articles!