Trouble detecting when dishwasher is done

I am using a smart plug to monitor power to my dumb dishwasher and want to receive a notification when the wash cycle is complete, as close as possible, to the time it actually finished.

I was going to use the logic, “If the power is < 2.6 watts for three minutes” and “dishwasher_running (boolean helper set by another automation) == ON”, then assume the cycle is finished and send me a notification.

The problem is that the cycle dips to 2w for 25 minutes (08:05:08 - 08:30:09), then jumps to 4-10w (when the washer is draining) before being done, where it sits at about 2w until I come by and press then OFF button.

What is the best way handle this pattern?

For reference, here is my automation YAML:

alias: Dishwasher complete notification
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.dishwasher_plug_power
    for:
      hours: 0
      minutes: 3
      seconds: 0
    below: 2.6
conditions:
  - condition: state
    entity_id: input_boolean.dishwasher_running
    state: "on"
  - condition: numeric_state
    entity_id: sensor.dishwasher_plug_power
    below: 2
actions:
  - action: persistent_notification.create
    metadata: {}
    data:
      message: The dishwasher is done, please open the door.
      title: Dishwasher Complete!
      notification_id: dishwasher_done_initial
  - action: notify.mobile_app_pixel_8
    metadata: {}
    data:
      message: Open the dishwasher door
      title: Dishwasher Complete!
      data:
        ttl: 0
        priority: high
  - delay:
      hours: 0
      minutes: 10
      seconds: 0
      milliseconds: 0
  - repeat:
      sequence:
        - action: persistent_notification.create
          metadata: {}
          data:
            message: "Reminder: Open the dishwasher door!"
            title: Dishwasher Reminder
            notification_id: dishwasher_done_repeat
        - action: notify.mobile_app_pixel_8
          metadata: {}
          data:
            message: Open the dishwasher door
            title: Dishwasher Reminder
            data:
              ttl: 0
              priority: high
        - delay:
            hours: 0
            minutes: 10
            seconds: 0
            milliseconds: 0
      until:
        - condition: state
          entity_id: binary_sensor.aqara_dishwasher_door_sensor_contact
          state: "on"
  - action: input_boolean.toggle
    metadata: {}
    data: {}
    target:
      entity_id: input_boolean.dishwasher_running
mode: single

Maybe you could use this as your trigger?

triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.dishwasher
    above: 3
    below: 11
    for:
      minutes: 3

Perhaps you need a longer for time?

So when off it is 0?

0(off) >> 2w (on, cycle start) >> 4-10w(draining) >> 2w (done) >> 0w (manual off)

Would use multiple triggers and add states

Trigger 1 - from off to 2w
Condition - off xx minutes
Running

Trigger 2- from 2w to >3.7w
Draining

Trigger 3 - from > 3.7 to <2.3w
Complete

Trigger 4 - to <.5w
Off

You can use trigger ID to invoke specific action for each trigger and set state or send notifications

The washer is only at 0w when the power button is pressed, which turns off the 7-segment display.

Hi,

If 25 minutes is the avarage time after the mayor power drop you can base a automation on that

I think this is a good option. Possibly utilizing a “Select” helper with the states
Running
Draining
Complete
Off
The select state is advanced based on the power level and the state that is currently selected.

Hello,

You can complicate it as much as you like, but as stated above, change this to 5 or 10 minutes because you will not even notice it in actual use and this should work for you…
What if, for instance, someone opens the door for a few minutes to fix a pot that flipped or to add another dish.
Give the “I’m done” one plenty of time.