What is the easiest to implement a toggle button for light? When the button changes state - light also does that. So if button changed for 1 to 0 when light was off it will be on e.t.tc.
The trigger part is easy…
trigger:
- platform: state
entity_id: switch.kitchen_hb_light
But than comes the hard part - can i keep it sumple or have to write 2 rules?
One will be with condition if light is on and one is if it is off. I guess it can be done with template but an example would greatly help
Thanks makes perfect sense. But i understood it differently. Shouldn’t it be a button in the automation receiveing the status (it’s a physical button) and then calling a script to switch on or off the light? or…?
Something like