Toggling lights is easy via the light.toggle
service.
I have two scripts, one turns on an entitiy with special parameters and the other turns it off (again special parameters and a delay).
What is a neat way to run the turn on
script if entity is off
and run the turn off
script when the entity is on
?
I have one wall panel button that should do both depending on whether the light entity is on or not.