Notification when Washing Machine has finished

I found very useful to be notified when the washing cycle is completed, especially if then washing machine is upstairs and you can’t check directly on it.

For not smart machine you can achieve this result simply measuring the washer energy consumption and detect when the machine switch from a higher energy consumption to a lower energy consumption and send a notification to your mobile using HA companion App or by generating an Alexa voice announce.

To measure the energy consumption I’ve used a Shelly EM (instead of a Smart plug): using a clamp probe, Shelly EM doesn’t connect directly to the load and this prevent any issue related to directly interact with high draw appliance (like Washing Machine).

Install Shelly EM

Danger of electrocution! The installation of the Device should be done by a qualified person

Important things to know about the EM clamp:

  • Clamp must be installed following the proper direction on the phase wire. On top of the Clamp there is a label K -> L, the arrow shows the direction of the current flow: L is your Load (the Washer)
  • Clump must wrap only a single wire, on a two phases system, like mine, doesn’t matter which one ( I’ve used the Phase). Do not clamp the whole power cord, otherwise you will read 0 power consumption.

Shelly Integration setup

I’ve used the Official Shelly Integration to integrate the Shelly EM device into my Home Assistant (link).

My Shelly entities are now available like following:

Custom washer sensor

Open your configuration.yaml file and create a new Template sensor:

template:
  - binary_sensor:
      - name: "Washer"            
        delay_on:
          minutes: 1
        delay_off:
          minutes: 3
        state: >
          {{states('sensor.lavatrice_channel_1_power')|float > 22 }}

This sensor will turn on/off the binary “Washer” sensor when the power consumption goes up 22 KWatt for at least 1 minutes, and when goes down same values for 3 minutes

The value 22 must be adjusted according to each Washing machine: just start a washing cycle and take note of the Shelly EM “Channel 1 Energy” sensor reading when the machine is in stand-by and when it starts; use the value right before the consumption starts grown.

Restart Home Assistant or reload Sensor Templates to enable the sensor.

Automation for notifications

Create a new automation to be notified when the new sensor State goes from ON to OFF:

For the Alexa notification you need to install and setup the custom Alexa Media Player Integration (link)

alias: Notify Washer is done
description: ""
trigger:
  - platform: state
    entity_id: binary_sensor.washer
    for:
      hours: 0
      minutes: 0
      seconds: 3
    from: "on"
    to: "off"
condition: []
action:

  - service: notify.alexa_media_alexa_cucina
    data:
      data:
        type: tts
      message: Washing machine is done
  - service: notify.mobile_app_sm_a525f
    data:
      message: Washing machine is done
mode: single