Action when laundry is done

I just realized that my “Done” notification doesn’t make much sense without the startup automation, so here’s the whole thing with the Dryer included as well.

I have two Aeotec Smart Plugs and I used the energy states to monitor things. I had to consider that the washer has pauses in it’s sequence that drop the power so I had account for that. I also had to account for the dryer load increasing when you open the door (the light) too.

I ended up creating two template sensors to count for those thresholds:

#
#   Automation Templates
#
#    True when washer power level is below 3.4 watts, high threshold of resting state
#    Default state is true
     washer_pwrdn:
       value_template: "{{ states('sensor.aeotec_smart_switch_6_power_10_8') | int < 3.4 }}"

#    True when Dryer power level is above 8.4 watts, showing dryer is in operation (as opposed to just having the door open)
#    Default state is false
     dryer_pwrup:
       value_template: "{{ states('sensor.aeotec_smart_switch_6_power_11_8') | int > 8.4 }}"

and these are used in the automations, now shown in full:

# Washer Notification Sequence

- alias: 'Washer Start'
  trigger:
    platform: state
    entity_id: sensor.washer_pwrdn
    from: 'True'
    to: 'False'
  action:
    service: input_boolean.turn_on
    entity_id: input_boolean.washer_switch

- alias: 'Washer Done'
  trigger:
    platform: state
    entity_id: sensor.washer_pwrdn
    from: 'False'
    to: 'True'
    for:
      minutes: 3
  condition:
      condition: state
      entity_id: input_boolean.washer_switch
      state: 'on'
  action:
    - service: notify.pushbullet
      data:
        message: 'Robert, the washer is done.'
    - service: input_boolean.turn_off
      entity_id: input_boolean.washer_switch

# Dryer Notification Sequence

- alias: 'Dryer Start'
  trigger:
    platform: state
    entity_id: sensor.dryer_pwrup
    from: 'False'
    to: 'True'
  action:
    service: input_boolean.turn_on
    entity_id: input_boolean.dryer_switch

- alias: 'Dryer Done'
  trigger:
    platform: state
    entity_id: sensor.aeotec_smart_switch_6_power_11_8
    state: '0.0'
  condition:
    condition: state
    entity_id: input_boolean.dryer_switch
    state: 'on'
  action:
    - service: notify.pushbullet
      data:
        message: 'Robert, the dryer is done.'
    - service: input_boolean.turn_off
      entity_id: input_boolean.dryer_switch
5 Likes