Automation timeout

Hello all! Newish to home assistant and still getting my feet wet. I’ve tried searching and I still can’t quite figure this out.

I have an automation that triggers when the energy monitor for my clothes dryer goes above a certain wattage then waits for it to drop below that same wattage to let and sends me a notification that the clothes are done drying.

That automation works great except for halfway through the cycle my dryer power drops down to zero for about a minute a couple times. How do I tell the automation to wait until the power has remained at zero for at least a minute before sending notification?

show us your current automation, paste the code here correctly.

alias: Clothes Dryer Done
description: ""
trigger:
  - type: power
    platform: device
    device_id: b5c17fbb626625c0bbea04688292b340
    entity_id: sensor.clothes_dryer_14_1min
    domain: sensor
    above: 20
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition: []
action:
  - wait_for_trigger:
      - type: power
        platform: device
        device_id: b5c17fbb626625c0bbea04688292b340
        entity_id: sensor.clothes_dryer_14_1min
        domain: sensor
        below: 20
    continue_on_timeout: false
    timeout:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 0
  - service: tts.google_translate_say
    data:
      message: Clothes are done drying
      entity_id: media_player.first_floor
mode: single

try this:

action:
  - wait_for_trigger:
      - type: power
        platform: device
        device_id: b5c17fbb626625c0bbea04688292b340
        entity_id: sensor.clothes_dryer_14_1min
        domain: sensor
        below: 20
        for:
          hours: 0
          minutes: 2
          seconds: 0

Thank you, I will try it and let you know how it works after the next drying cycle.

I thought it might have been the time out, but wasn’t sure if to put it on the trigger or the wait action.

EDIT: That didn’t work. Now it doesn’t let me know it’s done at all.

1 Like