I have a switch which is turned on by automation1 and now I am writing automation2 to switch it off.
There are 2 options:
put for: 00:15 in the trigger “switch went on”
put for: 00:15 in the condition
Trying to figure out the difference. I thought 1) is enough but without the condition, the switch’s history is flooded with “turned off” (can be seen with the recent 0.115 update).
oh, I did not realize that. cool, thanks, this solves one of my cases but not others as there may be more than one automation enabling a switch, so the original question still stands.
@aik ,
I would recommend splitting into two and using the for in the trigger of the second.
If you go the other route, then ‘if’ you have a restart (during that 15 mins) the the switch will be on permanently, until you manually switch it off.
I’m just lazy though, as you could have everything switch to off on a restart, but you WAF, may hit rock bottom.
I’d suggest you use a Device trigger that triggers when the on state is true for 15 minutes.
It is reliable as long as you do not edit your automations during that 15 minutes.
A different solution is to use a helper that sets the timestap value + 900 seconds and have it triggered the “turn_off” automation.
Setting your helper is easy, add the following line to the data field: timestamp: {{ (as_timestamp(now())+900) | int }}`