How do you make your HA more robust against mistakes?

I couldn’t find a better title but to explain simply my motivation I will provide an example:

Last night I updated my HA and woke up to my very power hungry heater being turned on the whole night. It is controlled by a smart outlet. It was turned on by a button and was supposed to turn off after 30min. But, because of the HA update and restart it did not turn off after those 30min which makes sense if automations are restarted as well.

My question here is not really how to prevent this specific case because I assume I can set up some standalone timers that will solve the specific problem. What I’m trying to find out is how do you ensure that if something goes wrong with your automation logic or other factors then you won’t come home to a burned down apartment because you set up your coffee machine automation outlet wrong.

Is there some methodology that you use? Something that will double check and not let devices be turned on or off by accident in case the base method fails?

My policy for all automations is I never use any type of “wait” action over 5 minutes. and if it’s critical I don’t use any “wait” actions at all.

For those things I will set an input datetime to when the device should next be operated or the desired action taken and then I use that in an automation. depending on your automation logic it could be used in the same automation using two triggers.

1 Like

There are startup events you can hook into for automation checks. I also a timer add on the other day that retained the state through reboot. Can’t remember where I saw it, sorry.

For things that need to happen in the future I’ve moved to setting an input_date time and an automation that is triggered by that variable. Significantly reduces the probability ha will be restarting then.