Using the new Sonoff POW R2 current sensor, we added a new Home Assistant automation to notify via text message on phones and tablets and send audio alerts to our Sonos smart speakers when the washing machine has completed its cleaning cycle.

The Sonoff POWR2 sends updates every 10 seconds via our MQTT server to Home Assistant.

Using the following automation script, we can monitor its current usage and when the sensor.washing_machine_power drops below 5 watts for over two minutes. It sends notifications to our phones, tablets and speakers.

The data below from the sensor shows the mains current in amps throughout three washing cycles starting with a complete cycle, a short cycle with a small washing load and ending with a complete cycle.

The peaks on the graph at 10 amps are the water heating cycles, and the smaller peaks at the end of each cycle are the higher-speed spinning mode.

Current usage graph
Current usage graph

Automation Code

alias: Washing Machine Cycle finished
description: ''
  - platform: numeric_state
    entity_id: sensor.washing_machine_power
    below: '5'
    for: '00:02:00'
condition: []
  - service: notify.mobile_app_brian_iphone
      message: >-
        Alert! The washing machine has finished, please remove the clothes from
        the washing machine
          sound: Update.caf
  - service: script.scriptwashingmachinecomplete
mode: single

Sonos Script

A second script has been added to Home Assistant for the Sonos smart speakers, which makes use of the Sonos snapshot feature to save the current state of the speaker, then sets the volume to 0.3 level, plays a voice alert from local storage with a short delay before restoring the Sonos state and allowing the speaker to continue as before.

This could have been added to the above automation, but I kept it separate for future expansion and added variables to play different files or on the other Sonos speakers in the house.

The audio file was created using a free text-to-speech service from

alias: ScriptWashingMachineComplete
  - service: sonos.snapshot
      entity_id: media_player.living_room
  - service: media_player.volume_set
      volume_level: 0.3
      entity_id: media_player.living_room
  - service: media_player.play_media
      entity_id: media_player.living_room
      media_content_type: music
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: sonos.restore
      entity_id: media_player.living_room
mode: single