Debugging a time trigger that doesn't fire

I’ve got this automation that should trigger at both 9:30pm and 11:00pm but for some reason last night it didn’t trigger at all at 11pm!

- id: '1638507670362'
  alias: Heat Pad Automation
  description: Turns the heat pad on and off
  trigger:
  - platform: time
    at: '21:30:00'
    id: on_time
  - platform: time
    at: '23:00:00'
    id: off_time
  condition: []
  action:
  - choose:
    - conditions:
      - condition: trigger
        id: on_time
      sequence:
      - type: turn_on
        entity_id: switch.heatpad_relay
        domain: switch
    - conditions:
      - condition: trigger
        id: off_time
      - condition: state
        entity_id: binary_sensor.in_bed
        state: 'on'
      sequence:
      - delay: 01:00
      - type: turn_off
        entity_id: switch.heatpad_relay
        domain: switch
    - conditions:
      - condition: trigger
        id: off_time
      - condition: state
        entity_id: binary_sensor.in_bed
        state: 'off'
      sequence:
      - wait_for_trigger:
        - platform: state
          entity_id: binary_sensor.in_bed
          to: 'on'
        timeout: 04:00:00
      - delay: 01:00
      - type: turn_off
        entity_id: switch.heatpad_relay
        domain: switch
    default: []
  mode: single

It seems to be pretty straightforward and it has worked for a long time in all conditions. It has had this happen once before too. My wife tells me in the morning that she woke up at like 4am sweating bullets because the heatpad didn’t turn off and she had to turn it off manually. I couldn’t find anything amiss that time either. She did get in bed at 11:15pm last night but looking at the automation debugger, the automation never even triggered, what gives?:

anyone know how to further debug this issue?

Did you happen to restart/reload automations at about that time?

LOL, @finity you nailed it. It looks like I restarted it right at 11pm! OMG, I’m dumb. I must have just missed the automation… :slight_smile:

image

1 Like