The "for" option in automation trigger is not working

I’ve got an automation that turns off my set-top boxes when my TV has been turned off for 50 seconds.

alias: Telly off
description: ""
  - platform: device
    type: turned_off
    device_id: 4115ac9a9e390ad9b96303c54136a7b0
    entity_id: remote.sony_bravia_tv
    domain: remote
      hours: 0
      minutes: 0
      seconds: 50
condition: []
  - service: media_player.turn_off
    data: {}
        - 6a097e8a82c0c1d7b9646ba7b7780e81
        - 062969749d78489b55ea7756f8cacf52
mode: single

The trigger delay of 50 seconds was added to guard against the fact that the TV would periodically momentarily report that it was off when it wasn’t.

It’s been running perfectly well for years, but recently it’s started ignoring the trigger delay and is turning the two set-top boxes off immediately.

I’ve tried a test in a new automation using different devices (lights in this case) and automation trigger delay is working, so I’m at a loss as to why this is happening.

Any ideas?


Your device most likely changed something. Just switch to a normal state trigger with a for duration.

Hi. Thanks for the thought, but surely if that were the case the automation wouldn’t run at all!