Trigger not... triggering :-)

Hey,

sort of an odd problem here. I have this automation trigger:

alias: 'Pool: pump on'
description: ''
trigger:
  - platform: device
    type: turned_off
    device_id: 324f212b90726246b55fa3e1cb950c32
    entity_id: switch.pool
    domain: switch
    for:
      hours: 2
      minutes: 0
      seconds: 0
  - platform: device
    type: turned_on
    device_id: 324f212b90726246b55fa3e1cb950c32
    entity_id: switch.pool_2
    domain: switch
  - platform: state
    entity_id:
      - switch.pool
    from: 'on'
    to: 'off'
    for:
      hours: 2
      minutes: 5
      seconds: 0

It does not trigger. The device (Fibaro Double Switch, via zwave) is reachable and working. If I reduce the time from 2 hours to 2 minutes it works. I cant wrap my head around this.

Any clues anyone? :slight_smile:

For durations get reset when an automation is saved or anything is restarted. So if the switch is turned on and then you do ANY saving of ANY automation in HA, it will negate that ‘for’ duration. Could this by whats happening in your case? I don’t like to use ‘for’ durations in longer spans of time… I prefer to start a timer or a datetime helper and use that to trigger instead of using ‘for’ durations.

That actually might be the case!
I will check this right now. Thanks!