Home Assistant Notifying of Clothes Washer Completion

My clothes washer makes a little jingle when it completes a cycle, however that noise isn’t exactly loud, and its simply not possible to hear it other than in the room right next to the machine. Because of this I’d like to get a text message notification when the machine finishes.

Goals

  • Send a notification to my phone when the washing machine is done

First things first, I needed to verify the current draw of my washing machine to ensure it doesn’t go over the maximum load of the smart plug. A few Google searches out of the way and I determined that my washer is 10amp and the CloudFree SmartPlug 2 has a 15 amp maximum, perfect. I’ll be able to use the hardware that I want to.

Plan

My plan is to use the power monitoring on the smart plug to let me know when the washer starts and ends its cycle. I should be able to trigger the notification when the power draw of the washer drops below some threshold for a period of time.

I got the smart plug configured and home assistant getting the data. After that I plugged it into the outlet for my washer and plugged in the washer. The washer turned on and gave me a decent power draw picture for it being in an active mode like that just after a wash. I noticed the plug also had some off kilter numbers (220v read from the outlet where it should be 110v), so I know my wattage numbers aren’t accurate, though in this case I just need to know about changes in draw so this will be alright. I’ll revisit calibrating the plugs in the future.

I did run one command on the smart plug console before I created my automations.

 PowerDelta1 105 

This tells the smart plug to update home assistant for any change of power usage 5 watts and over. This is needed to keep the smart plug triggers to run more quickly on the changes.

First Automation Attempt

My first thought was to create an automatic that would trigger on power draw going under a certain value. I got things generically laid out when I realized this wasn’t going to work the way I would hope. I have my automation setup below.

An Ill Fated Automation
Though a Fine Service Call

This path started looking like the wrong path to go down, the system started looking like it would trigger too frequently or would miss events that should trigger it. I had to go another route, and I decided to find a blueprint for it as I had never used one before, time to try a new thing.

Second Attempt

I realized all the pitfalls of making my own system and the bugs I’d have to work out, so I dug around to see if someone else had solved this problem when I found this blueprint. This seemed quite promising since it handled the cases in-between washing cycles where your power may drop below the threshold but not be complete yet. I provided inputs for my washer based off of the values I found earlier.

Inputs into the Blueprint for my Washer
Using My Email/Text Notification Service to Send the Notification

I noticed the power thresholds were underlined red in my automation definition, so I dug around a bit. It looks like the max on both of those inputs in this blueprint is 100W. I wanted those thresholds to be a tad higher, so I decided to update the blueprint.

Using VSCode on my Home Assistant installation, I navigated to the blueprint on the filesystem and modified the maximum on those thresholds to be 200 instead. Below are the two sections I modified.

    starting_threshold:
      name: Starting power threshold
      description: Power threshold above which we assume the appliance has started.
      default: 5
      selector:
        number:
          min: 1.0
          max: 200.0
          unit_of_measurement: W
          mode: slider
          step: 1.0
    finishing_threshold:
      name: Finishing power threshold
      description: Power threshold below which we assume the appliance has finished.
      default: 5
      selector:
        number:
          min: 1.0
          max: 200.0
          unit_of_measurement: W
          mode: slider
          step: 1.0

After saving the modifications, I restarted Home Assistant Core from the webui and now my inputs in that automation weren’t underlined.

Updated Inputs with 200W maximum

From here it’s time to test. Running my first load of laundry and I get a notification after it’s completed, no false positives. This was a good first guess at wattage numbers for signaling the notifications. Running 4 more loads and things look good and in order. This is quite helpful at keeping me on top of the laundry and was relatively simple to setup. Now onwards to more systems like it, notifications if the laser cutter is running and maybe if the 3d printer completes too.

References

BluePrint Below For Ref:

I like including things in case the source links go dead in the future:

blueprint:
  name: Appliance has finished
  description:
    Do something when an appliance (like a washing machine or dishwasher)
    has finished as detected by a power sensor.
  domain: automation
  input:
    power_sensor:
      name: Power Sensor
      description: Power sensor entity (e.g. from a smart plug device).
      selector:
        entity:
          domain: sensor
    starting_threshold:
      name: Starting power threshold
      description: Power threshold above which we assume the appliance has started.
      default: 5
      selector:
        number:
          min: 1.0
          max: 200.0
          unit_of_measurement: W
          mode: slider
          step: 1.0
    starting_hysteresis:
      name: Starting hysteresis
      description:
        Time duration the power measurement has to stay above the starting
        power threshold.
      default: 5
      selector:
        number:
          min: 0.25
          max: 60.0
          unit_of_measurement: min
          mode: slider
          step: 0.25
    finishing_threshold:
      name: Finishing power threshold
      description: Power threshold below which we assume the appliance has finished.
      default: 5
      selector:
        number:
          min: 1.0
          max: 200.0
          unit_of_measurement: W
          mode: slider
          step: 1.0
    finishing_hysteresis:
      name: Finishing hysteresis
      description:
        Time duration the power measurement has to stay below the finishing
        power threshold.
      default: 5
      selector:
        number:
          min: 0.25
          max: 60.0
          unit_of_measurement: min
          mode: slider
          step: 0.25
    actions:
      name: Actions
      description: Actions (e.g. pushing a notification, TTS announcement, ...)
      selector:
        action:
  source_url: https://gist.github.com/sbyx/6d8344d3575c9865657ac51915684696
trigger:
  - platform: numeric_state
    entity_id: !input "power_sensor"
    for:
      minutes: !input "starting_hysteresis"
    above: !input "starting_threshold"
condition: []
action:
  - wait_for_trigger:
      - platform: numeric_state
        entity_id: !input "power_sensor"
        below: !input "finishing_threshold"
        for:
          minutes: !input "finishing_hysteresis"
  - choose: []
    default: !input "actions"
mode: single
max_exceeded: silent

Leave a Reply