Reliable way to turn off a switch after being on of 1 hour

Hi all,

I have a switch (Sonos S26 with Tasmota) integrated with my Home Assistant. The scenario I want to accomplish is that it should be turned off automagically, 1 hour after that it has been turned on. Currently I have achieved this by creating an automation with a state trigger, from “off” to “on”, with a “for” of “01:00:00”. The action of that automation is to activate a scene that turns of the switch.

This works, but I noticed that if I reboot my Home Assistant after the switch has been turned on, the automation is not triggered anymore. So the switch never turns off? Is there a better/more reliable way to turn of my switch?

(maybe related to my scenario: I noticed the sonoff switch displayed the state “off” after the reboot, while it was still “on”)

Thanks again!
Jan

Check this out, can keep timers over a reboot.

1 Like

Small update: thanks to the “Sync Power State” tip in the Tasmota wiki the state of the plugs is displayed correctly after a reboot of Home Assistant.