Washer/Dryer Compete Automation

Hey everyone. I’m trying to write an automation that will alert me when my washer/dryer is finished. I have a voltage detector (emporia) I use to monitor energy.

My previous iteration would notify me when there was a voltage drop below 10W for 3 minutes -

alias: Garage - Dryer Complete
description: ""
trigger:
  - type: power
    platform: device
    device_id: xxxxxx
    entity_id: sensor.dryer_123_1min
    domain: sensor
    below: 10
    for:
      hours: 0
      minutes: 3
      seconds: 0
action: 
   - service: notify.notify
      data:
         message: dryer finished
mode: single

This worked but the automation would trigger occasionally for no reason. I think a better method would be to monitor for an increase in voltage but then notify me when there is a drop below 10W for a few minutes. I’m trying a few different options including a “wait_for_trigger” action that would alert me when there is a voltage drop:

alias: Garage - Dryer Complete
description: ""
trigger:
  - type: power
    platform: device
    device_id: xxxxxx
    entity_id: sensor.dryer_123_1min
    domain: sensor
    above: 10
    for:
      hours: 0
      minutes: 1
      seconds: 0
action: 
   - wait_for_trigger:
       - type: power
         platform: device
         device_id: xxxxxxx
         entity_id: sensor.dryer_123_1min
         domain: sensor
         below: 10
         for:
              hours: 0
              minutes: 3
              seconds: 0
     timeout:
        hours: 0
        minutes: 1
        seconds: 0
        milliseconds: 0
     continue_on_timeout: false
- service: notify.notify
  data:
     message: dryer finished
mode: single

note: spacing may be off since I couldn’t cut/paste my code directly.

This new iteration doesn’t seem to be working at all. I was wondering if there was something I was missing about the “wait_for_trigger” directive.

Any help would be appreciated!

J

I think the problem may be your timeout and continue_on_timeout settings. A one minute timeout means the trigger of <10W for 3 minutes will never be able to be reached, and since it won’t continue after that (extremely short) timeout period, the whole automation full stops at that point. Try it with a reasonably long time out (figure out what your longest drying cycle is expected to be and add, say, 10 minutes to it to pad a bit). I’d also set continue_on_timeout true in that case, since it’s probable your dryer has finished after the long timeout period and something else may have gone wrong with the energy sensor (perhaps it went unavailable) and this will still prompt you to go check the dryer at that point. Otherwise, assuming everything is working as expected, you’d get the notification 3 minutes after it drops below 10W.