Timer.finished event is not triggering automation

Hello, I’m super new to HA and making progress along the learning curve thanks to this forum. However, I have a problem I just can’t figure out, even after reading all the similar posts…

I have a timer called timer.fire_alarm_alert_timer (side question - I created this through Helpers on the GUI, but where does it stick the YAML for it?).

Here’s my automation action that starts the timer:

  - action: timer.start
    target:
      entity_id: timer.fire_alarm_alert_timer
    data: {}

When this fires I can watch the timer countdown until it finishes. I’ve also manually started the timer through the GUI and finished it myself. If I use Developer Tools to listen to timer.finished, I see this when the timer finishes:

event_type: timer.finished
data:
  entity_id: timer.fire_alarm_alert_timer
  finished_at: "2025-02-23T22:56:29+00:00"
origin: LOCAL
time_fired: "2025-02-23T22:55:46.593929+00:00"
context:
  id: 01JMTGC5X1PXXF85R2T7W6TPPS
  parent_id: null
  user_id: null

However, my automation never triggers. Here’s the automation’s trigger:

alias: Test Timer Finished
description: ""
triggers:
  - trigger: event
    event_type: timer.finished
    event_data:
      entity_id: timer.fire_alarm_alert_timer
conditions: []
actions: []
mode: single

When I click on the automation’s traces, it says: “No Traces Found”. The log for the automation shows that it has never triggered.

I’m basing this off of the example given here:

- alias: "Timerstop"
  id: "Timerstop"
  triggers:
  - trigger: event
    event_type: timer.finished
    event_data:
      entity_id: timer.test
  actions:

Any ideas of what I’m doing wrong? Or hints on how to debug? Being new to HA, I still need to learn debugging skills.

On a slightly different topic, how are y’all dealing with timers that finish if HA is down? I’d like to run the automation if the timer finishes when HA is rebooting or whatever. Triggering on the state of the timer being idle doesn’t work because if it was never run or cancelled, it would also be idle. Thank you!

Note: I’m running HA Core 2025.2.4 with HA OS 14.2.

Don’t know if this is relevant, but indentations are different in the two trigger examples you give.

On the last question, when you set up a timer there’s a “Restore state” option, so the timer will resume after HA has restarted.

…but there’s no way to take into account time that may have passed while HA was down.

Edit: Just checked on your first side question. Timers appear to be stored in config/.storage/timer but I don’t think it’s editable.

Hmm, i can’t see anything wrong with your automation. But i’ve got a couple ideas for you to try: (1) with your existing automation, add a unique id to it. (It can pretty much be anything, but typically go to https://www.uuidgenerator.net/ and copy on from there). That’s the only difference I can see between what I just set up to test and yours. My code is below (both with action and just a bare trigger-like your example-and both worked).

no action on timer finish
id: '1740380610812'
alias: EVENT NO ACTION AUTO
description: ''
triggers:
  - trigger: event
    event_type: timer.finished
    event_data:
      entity_id: timer.tap_click_timer
conditions: []
actions: []
mode: single
post notification on timer finish
alias: EVENT AUTOMATION
description: ""
triggers:
  - trigger: event
    event_type: timer.finished
    event_data:
      entity_id: timer.tap_click_timer
conditions: []
actions:
  - action: persistent_notification.create
    metadata: {}
    data:
      message: EVENT AUTOMATION SUCCESS
      title: BUTTS
mode: single

(2) Alternative Approach - Entity State

Try and create an automation that uses the entity state as the trigger. Here’s what i came up with, and functions essentially the same as your event-based automation. I set mine up to trigger when it goes from activeidle.

alias: timer test automation
description: post notification on timer finish
triggers:
  - trigger: state
    entity_id:
      - timer.tap_click_timer
    from: active
    to: idle
conditions: []
actions:
  - action: notify.persistent_notification
    metadata: {}
    data:
      message: test automation
      title: timer test
mode: single

Thank you for your responses! As a test, I created a new timer called tap_click_timer, and then copied and pasted the YAML automations into new automations that @toonarmy posted above for a fresh test. They both work just fine! Thank you for posting these. Having something working should allow me to figure out my problem. I’ll continue tomorrow after getting some sleep and post what I find.

@toonarmy Regarding your alternative approach, this is where I started. But then I added a button to my dashboard to cancel the timer, but cancelling the timer will cause that trigger to trigger; but I only want it to trigger when it has finished.

I couldn’t find any difference in the YAML for my automation versus this test automation (other than the timer name)… I ended up deleting the automation and re-adding it, and now it works just fine. So I’m good to go, but not sure what the issue was. :man_shrugging: Thank you for the support!