Timer.finished not working

Need some help with this. I’m trying to set up control logic for a bathroom exhaust fan, with multiple triggers to turn the fan on/off based on various criteria (humidity, switch, timer, etc)

The first 4 triggers work and will initiate a trace. However, the timer.finished trigger isn’t working.

alias: Olive's Bathroom - Fan Logic
description: ""
triggers:
  - type: turned_on
    device_id: 4579fb219e9e7cd038941647d543e26d
    entity_id: 5c7e78855b7f6a476a52a07819f173e5
    domain: switch
    trigger: device
    id: Fan Switch Turned On
  - type: turned_off
    device_id: 4579fb219e9e7cd038941647d543e26d
    entity_id: 5c7e78855b7f6a476a52a07819f173e5
    domain: switch
    trigger: device
    id: Fan Switch Turned Off
  - type: humidity
    device_id: 88c8f6cdc6de52211e65a6c5e0d582e4
    entity_id: 4bde3d33b2aca0f8660f799c7fafa8e7
    domain: sensor
    trigger: device
    id: High Humidity
    above: 65
  - type: humidity
    device_id: 88c8f6cdc6de52211e65a6c5e0d582e4
    entity_id: 4bde3d33b2aca0f8660f799c7fafa8e7
    domain: sensor
    trigger: device
    id: Normal Humidity
    below: 65
  - trigger: event
    event_type: timer.finished
    id: Fan Timer Finishes
    event_data:
      entity_id: timer.olive-bathroom-fan
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Fan Switch Turned On
        sequence:
          - action: input_boolean.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.olive_bathroom_fan_helper
          - action: timer.start
            metadata: {}
            data: {}
            target:
              entity_id: timer.olive_bathroom_fan_timer_helper
      - conditions:
          - condition: trigger
            id:
              - Fan Switch Turned Off
        sequence:
          - action: input_boolean.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.olive_bathroom_fan_helper
          - action: timer.cancel
            metadata: {}
            data: {}
            target:
              entity_id: timer.olive_bathroom_fan_timer_helper
      - conditions:
          - condition: trigger
            id:
              - Fan Timer Finishes
          - type: is_temperature
            condition: device
            device_id: 88c8f6cdc6de52211e65a6c5e0d582e4
            entity_id: 026b56c8b41b43919fbc84842eb6a86d
            domain: sensor
            below: 65
        sequence:
          - action: input_boolean.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.olive_bathroom_fan_helper
      - conditions:
          - condition: trigger
            id:
              - High Humidity
        sequence:
          - action: input_boolean.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.olive_bathroom_fan_helper
          - action: timer.cancel
            metadata: {}
            data: {}
            target:
              entity_id: timer.olive_bathroom_fan_timer_helper
      - conditions:
          - condition: trigger
            id:
              - Normal Humidity
        sequence:
          - action: input_boolean.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.olive_bathroom_fan_helper
mode: single


2 reasons.

  1. you have hypens in the entity_id in the event trigger.
  2. that’s not the entity_id of the timer. Your timer is timer.olive_bathroom_fan_timer_helper thus the entity_id in the timer.finished code ALSO needs to be this entity_id. It’s not a random thing like the id which you can use for determing which trigger kicked off thr automation later in the automation, it’s an event that fires when the timer finishes, thus you need to use the actual real entity_id in order to listen for it.
1 Like

Awesome, I was using the name I gave the timer, and didn’t think to look up the actual entity_id where I created it. This fixed caused it to start triggering, thank you!

1 Like