I use timers in automations to turn off my light after a certain time (64-bit raspberry pi4 2gb, HA OS 2022.11.2).
According to Timer documentation [Timer - Home Assistant] the event timer.finished should “fire on startup for any timers that would have ended while Home Assistant was stopped.” But it doesn’t work that way for me… Light will stay on indefenitely when timer finishes during HA restart. I thought the delay in zigbee2mqtt start after reboot might cause it (light entities are unavailable then) so I created test timer helper and test automation, with service which can (I think so) be executed right after restart (persistent_notification.create) to check this behaviour.
Automation:
alias: test
description: ""
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.test
condition: []
action:
- service: persistent_notification.create
data:
message: test
mode: single
It works flawlessly when HA is up, even after a restart, the still running timer will update its state and fire an event on the correct time (restart doesn’t affect it, cool). The problem is when timer finishes when HA is down. The timer.finished event won’t fire after restart (or it won’t just trigger the automation) Any thoughts what may be causing this problem?