Coming from Tasker on android, doing automations I’m used to the “exit task” trigger.
So you enter into a state -> do something, when the state is no longer true -> do something else.
Alternatively there is the “restore settings” option, where “do something” is undone upon exit.
Perhaps I missed something, but I do not see this as an option in HASS automations? I have found two different ways of doing what I wanted, but I wanted to hear from you if there are better ways or a best practice.
Need: When light1.brightness >90%: turn on light2
Solution 1:
Two separate automations, one for turning on, and another for turning off the second light.
Solution 2:
One automation. On state change of light1, do action turn on if brightness>90, else turn off.
Both ways have different pros and cons.
Btw this is not quite as straightforward as it seems since brightness is still for example 100% if the light1 is off, so one has to also check the state of the light not only the brightness.
Another example of a use for exit triggers would be: When sun is down -> light on, on exit ->light off