Перейти к содержимому

Why Your Home Assistant Automation Didn't Run After a Restart

Nobody Told Me About My Smart Home

0:00 / 0:00

Why Your Home Assistant Automation Didn't Run After a Restart

204 просмотра · 11 дн. назад
Nobody Told Me About My Smart Home
7 подписчиков
204 просмотра · 11 дн. назад
If a Home Assistant automation didn't run after a restart, this is probably why. One morning, an automation in my office started a thirty-second pause. Before the pause was up, Home Assistant restarted. Home Assistant's own record of that run ends on one word: cancelled. That one reruns at startup by design, so nothing was lost. Yours might not. When an automation is waiting, that wait lives only in Home Assistant's memory. That covers a pause, a wait for something, a "stays like this for" trigger, and a timer helper left on its default. A restart erases it. Unless something reruns the automation, whatever came after the wait doesn't happen. No error. No warning. The automation still says it's on. In plain English (the full version is in the pinned comment): A wait: anything that makes an automation hold before it acts. Restart: Home Assistant shutting down and starting again, for example after an update or some config changes. Restore: the timer helper's setting that lets it survive a restart. Two fixes: 1. A timer helper with restore on. Instead of waiting inside the automation, trigger it when the timer finishes. One limit: if the timer runs out while Home Assistant is down, it finishes during startup, before your automations are listening, and the automation never runs. The docs list this as a known limitation. 2. Store the deadline instead of waiting for it. When the door unlocks, write the time it should lock into a date and time helper, and trigger on that time. Then add two more triggers: when Home Assistant starts, and when the lock comes back after a restart. Each one checks whether that time has already passed, and if it has, locks now. Made the helper in Settings, in Date and time mode? You're fine. Wrote it in YAML? Leave out the initial line. Restore isn't something to turn on everywhere. The hold timer on the A/C in Penny's office has it off on purpose: if a restart clears the hold, the automation takes back over. For each timer, decide which way you'd rather it fail. Starter prompt to have an AI check your automations for this: https://gist.github.com/pcamp99/1f1b0... Another thing a restart does to your automations, setting off triggers that shouldn't fire, is Video 16:    • Home Assistant Automation Running by Itsel...   0:00 Cancelled by a restart 0:26 A restart throws the countdown away 0:52 Watch it happen 1:25 Why 2:26 Why you never noticed 2:43 What a restart cut short in my house 3:23 Fix one: a timer with restore on 4:05 Fix two: store the deadline 5:00 The habit, in plain English 5:28 A restart does two things Tested on Home Assistant 2026.10. The fix two YAML was validated, not run against a real lock. I'm not a coder. I use Claude for basically everything technical in my home automation setup. This channel documents the gaps nobody tells you about. #homeassistant #smarthome #homeautomation