Making ‘dumb’ Dishwashers and Washing Machines Smart: Alerts When the Dishes and Clothes Are Cleaned

I love the idea of everything in my home being able to communicate with each other. Thanks to Home Assistant I already have a lot of things talking to each other.

This is going to solve a massive first world problem. Or maybe it won’t. I’ll let you decide. The latest trend is for every device in your home to be connected to the internet. ‘The internet of things’. I can’t (or don’t want to) replace the dishwasher in my apartment (I’m a renter). I need to use other tools that will allow me to monitor the state of my dishwasher, and then use that information to tell me when the dishes are clean, so I don’t forget to empty it.

I don’t want to fork out thousands of dollars for a washing machine that can connect to a smart phone app, that will most likely be abandoned at some point in the future. Looking at you, Samsung.

 

Ingredients

I’ll be using the following hardware and software for this. Feel free to replace it with whatever works best for you. You may not have Z-wave, so any power monitor and contact sensor should work, as long as the end results match up.

  • Home Automation Software – I’ll be using Home Assistant, but other Home Automation software can be used as well, just check your poison of choice documentation.
  • Z-wave Power Monitor / Switch – I’ll be using the Aeotec Smart Switch
  • Z-wave Door/Window Sensor – I’ll be using a Fibaro FGK101

 

Monitoring The State

The first step is to decide how you’ll be monitoring the state of the machine. I like to use z-wave power switches, as you can easily tell when a machine is in use by how much power it is drawing. If no power is being used by the washing machine or dishwasher, then they’re off and not in use. The good thing using the Aeotec Smart Switch is it comes built-in with power level monitoring, and can easily be connected to a Z-wave Flood Sensor, so that if a flood is detected power is immediately cut.

I want to be alerted when either my washing machine or dishwasher have completed their cycle, but only if they haven’t already been emptied. There’s no point in sending myself or my fiancé an alert when we have already taken out the washing or put away the dishes.

 

DISHWASHER

First up the dishwasher. Once running, the dishwasher will draw power. Once finished, it will remain in a “standby” state until you open the dishwasher and turn it off. This means I can purely use the power level to determine if the dishwasher has been emptied or not. Once the dishwasher is finished, as long as someone opens the dishwasher and turns off the power, I’ll be able to see the power drop to zero, and mark the dishwasher as dirty again.

 

WASHING MACHINE

Unfortunately my washing machine is a bit smarter. Once the washing machine has finished, it will “beep” to let anyone within earshot know that the cycle is complete. After a couple of minutes, it will then turn itself off so it doesn’t waste standby power. This throws a slight spanner into the works, as I now won’t be able to tell if the washing machine is full and ready to have clothes taken out of it.

For the washing machine, I’ll use a combination of the power monitor and a Fibaro Door/Window Sensor. Once the washing machine has stopped running, I won’t reset the washing machine until the door has been opened, as detected by the door sensor.

 

Obligatory Caution

Before using a smart switch or plugin energy monitor on a high energy device (such as a washing machine/dryer/dishwasher), always check how much power your machine will draw from your smart switch/energy monitor.

See my notes at the end of this post for more details.

 

Defining the Stages

It can be a bit tricky using power levels alone to detect where in the cycle your machine is up-to. During the spin cycle, the power level may drop for several minutes and then pickup again. You don’t want to be alerted each time this happens.

To solve this, I’ll be using Home Assistant’s  input_select  component. This will allow me to define several states that the machines could be in. First, let’s define them.

 

DISHWASHER

Dirty The default state of the dishwasher. Dishes will be packed into the dishwasher until it is full and turned on.
Running The dishwasher is turned on and cleaning the dishes.
Drying The power level has dropped, and the dishwasher can now be considered to be “drying” the dishes.
Clean The power level has dropped for a few consistent minutes, and is now drawing “standby” power. Once power returns to 0, we’ll return back to the “Dirty” state.

 

WASHING MACHINE

Idle The default state of the washing machine. The washing machine is off and clothes have been unpacked.
Running The washing machine is turned on and cleaning the clothes.
Finishing The power level has dropped, and the washing machine will be finishing soon.
Clean The power level has dropped for a few consistent minutes. Once the door opens, we’ll return back to the “Idle” state.

 

The Latest In Your Inbox

Enter your email address below to receive my latest blog posts and videos about Home Automation in your Inbox

 

Transitioning Between Stages

Because power levels can go up and down, we need to make sure our system transitions between each stage correctly. That’s where the power of using a dropdown comes in. Let’s define some rules for how our machines may change states.

Why is this important? We don’t want to get spammed when the power goes up and down. Using the flow above, we can use delays to ensure that the machine is in the right state. Let’s say the Washing Machine is ‘Running’, and the power level drops. Once the power level drops, we’ll move it into the ‘Finishing’ stage. Once in the ‘Finishing’ stage, we’ll wait a certain amount of time before moving into the ‘Clean’ state and sending our notifications. However, if the power level increases again (such as the spin cycle starting again), then we’ll go back to the ‘Running’ stage, so the process can repeat.

The same logic applies for the dishwasher.

So how can we achieve this in Home Assistant? First we need to setup our input_select  dropdowns.

This will create two dropdown elements in Home Assistant that look like these:

 

Adding the Logic

Now that we have each phase of the machine cycles setup in Home Assistant, it’s time to automate the transitions between each stage. As I’m using a z-wave smart switch, we can use their power levels for this. Home Assistant makes these available to us as additional sensors. We’re looking for the power sensors.

Once you’ve found the entity that is tracking power consumption, lets add some automations to Home Assistant to move through the stages according to the diagram above.

First, the dishwasher is the easiest, as we will only be looking at the power levels.

These automations will change the input_select  component to the value according to where the dishwasher is up to. Once someone turns the dishwasher off, the power will drop below 1 (aka zero) and the dishwasher will be marked as clean.

The washing machine uses some similar logic. Which you can see below. However, we’ll wait for the door to open before we change the status, as it will turn itself off after a timeout.

 

Sending The Alerts

So now the fun part, we have Home Assistant reporting each stage of the washing machine/dishwasher cycle. It’s time to add some alerts around these. A simple alert when the dishwasher is clean looks like this:

That will send an alert to my phone via Pushbullet when the dishwasher has finished. However, that’s not always ideal.

  • If I turn on the dishwasher then go out, I will receive an alert on my phone when I am out, and forget about the dishes.
  • If I turn on the dishwasher at night before bed, I’ll get an alert when I’m asleep.
  • This will only send an alert to me. What if I am out, but my fiancé is home, it would be better to send her the alert so she can empty the dishwasher.

 

Making The Alert Smarter

So let’s see if we can make this notification more smart. Home Assistant will know who’s home and what time it is, so let’s update the automation to include the following rules:

  1. Don’t send an alert if it is after 10:30pm, or before 8:30am.
  2. Don’t send an alert unless someone is home. No point alerting us if no one is home to unpack the dishwasher.
  3. If the dishwasher is clean, and the time ticks past 8:30am, and people are home, alert them the dishwasher is ready.
  4. Only send an alert to the people who are home. Don’t bother anyone who isn’t at home.
  5. If the dishwasher is clean, and someone arrives home, send everyone who is home an alert, but only if the alert wasn’t sent in the last thirty minutes.

Let’s go ahead and make some adjustments to that notification above. First let’s apply rule 1 and 2.

 

We can easily add a time trigger now so that I get an alert at 8:30am if the dishwasher is clean.

 

Now the fun part, rule 4. In Home Assistant, we can use a Notify Group to dictate who will get the alert. I’ll setup three groups. One which will send an alert just to me, one which will send an alert just to my fiancé, and finally one which will send both of us an alert. Let’s go ahead, and change the action part of our alert now.

 

Finally rule 5. We’ll use another for  delay, of 10 minutes. This makes sure we’ve been home for a few minutes to put things down before we’re reminded to empty the dishwasher. It also gives the other person time to come inside from collecting the mail, or chatting up a storm with the neighbours, before the alert is sent.

We’ll use a template condition, to make sure that the alert isn’t sent multiple times. This is important. If my device is marked as home first then two minutes later my fiancé is marked as home, in ten minutes and twelve minutes the alert will be sent to both of us! Which might get annoying, very quickly.

 

The same logic can then be applied to our washing machine alert.

 

Home Assistant Nuances

If you’re using Home Assistant, there’s a few things you can do to make things look more user-friendly on the front-end, and a couple of things to watch out for.

 

Z-WAVE POLLING

In order for your z-wave power modules to report updated power levels, you may need to adjust your polling settings. I have mine set as following.

 

REPORTING OPEN CLOSED STATUS

I’m using a Template Sensor to make the door status easier to use. If you prefer to use the same, here’s how I do it.

 

HOW IT LOOKS

The dropdown menu for the status can get a bit clunky, so I’m also using two more Template Sensors to display a read-only view of the status on the Home Assistant webpage.

Using groups, Here’s how Home Assistant renders these cards.

 

Smart Switches and Power Usage

Devices with spinning parts (ie dishwashers and washing machines) may draw a high amount of power. Luckily for me, I have modern appliances which don’t draw too much power.

Before you plug your washing machine or dishwasher into a smart switch, always check the maximum power draw supported by your smart switch.

In my case, I am using an Aeotec Smart Switch 6 for my washing machine. According to the specs, the Australian version can handle up-to 10 amps of power usage (the US version can handle 15 amps at 120 volts). Looking at my washing machine manual, the maximum power is used when “washing and heating”, which is rated at 2,000 watts. Using a simple online calculator, the maximum amps drawn from my washing machine is 8.69 amps, which is just under the 10 amps supported by the smart switch.

My washing machine is a newer model, with an energy star rating. If your washing machine is older, it may draw more power than a smart switch can handle. You may risk burning out the smart switch, or under-powering your machine and causing damage.

 

Wrapping Up

Using some smart switches, and door/window sensors we’ve now integrated two commonly used household appliances into our smart home. I haven’t had to fork out thousands for the latest appliances with a smart phone app, and even better my home automation controller, Home Assistant is responsible for watching everything.

Using the information already known by Home Assistant, notifications are sent only when required and in a way that don’t spam our phones every-time something happens.

There’s a heap more applications you can use for smart switches, or door/window sensors. What cool automations have you created with these? I’d love to hear them.

Buy me a hot chocolateBuy me a hot chocolate
Recommended Posts
  • PuckStar32

    Well written and very interesting setup!

  • Alex

    This is great thanks! One thing is to find a way to control the appliances from phone or computer, like being able to start a cycle.

  • Eamonn O’Connell

    Very helpful. Thanks!

  • PuckStar32

    Hi Phil. With the new zwave names, to what did you change this part of the automation?
    trigger:
    – platform: numeric_state
    entity_id: sensor.fibaro_system_fgwpef_wall_plug_power
    value_template: ‘{{ state.attributes.power_consumption }}’
    above: 150

    As that attribute doesn’t seem to exist anymore.

    • Hey PuckStar

      Have you renamed your devices? You’ll need to do that first using the Z-wave panel in Home Assistant, and then rename the node.

      let’s assume I rename

      to

      the automation should look like

      You might also be able to see what the attribute is called from the States menu. This contains all the entities Home Assistant can see.

      Hope that helps!

      • PuckStar32

        So you still have an entity with a attribute “power_consumption”?

        I don’t seem to have that anymore.
        Here you can find all my wall plug entities:
        https://docs.google.com/spreadsheets/d/1IGjXkacd33-AFRYeFlD4dpSYDlRNq-tLSKnfJRlv2YA/edit?usp=sharing
        I didn’t rename the entity because I only have 1 of these plugs so the name given is fine for me.

        I think (didn’t test it yet) that this will work for me:
        trigger:
        – platform: numeric_state
        entity_id: sensor.fibaro_system_fgwpef_wall_plug_power
        above: 150

        • I admittedly haven’t switched over to the new entity IDs myself yet. I haven’t gone through and named all my devices yet.

          However, here’s one I have renamed

          According to the cards for these, the new IDs will just remove the numbers, so they should become

          That is from a Aeotec Smart Switch 6

          • PuckStar32

            I wasn’t necesarrily talking about the renaming. With only 1 device I don’t think it’s really needed.

            Anyway I can confirm power_consumption attribute is gone but this works well:

            trigger:
            - platform: numeric_state
            entity_id: sensor.fibaro_system_fgwpef_wall_plug_power
            above: 150

          • Mario Urbani

            I phil, fantastic job. May be there is something similar for a clothes dryer? so your work is complete. Thanks from Italy

  • Pingback: Making ‘dumb’ Dishwashers and Washing Machines Smart: Alerts When the Dishes and Clothes Are Cleaned | Ackbarr's Tech Journal()

  • poldim

    What’s your groups.yaml code look like for the image you posted?

    • I’m using a couple of group cards

  • PrinceDroflet

    Good to hear that this Aeotec works for your washer. I’m thinking of switching a wi-fi TP-Link hs110 currently on our old washer with this Aeotec switch to fill up a bit of a gap in my gradually expanding z-wave mesh. I’ll double check the current on this washer but I think it is only drawing 600W at 115V. It uses hot water input, so no heating element. My main usage is to run the washer at 6:20 in the morning before the electricity goes to peak rates, but I’ll try some of your code to get a notification that it is finished the cycle.
    Be very careful using the on-line calculator. Volts x Amps = Watts is true only for DC or for AC with a pure resistive load. For an inductive load such as a motor Volts * Amps = VA > Watts. Look in your washer’s manual for a max amps or max volt-amp rating, or google “power factor” for the technical details.

  • Adam Michael Rochford

    Another great post, thanks Phil. I have a Aeotec Z-Wave Smart Energy Monitor installed at the circuit breaker of my home, logging the Watts and kWh used every 30 seconds or so. I’m frugal, so won’t be buying a energy monitor for each appliance anytime soon – but the stats nerd in me is hoping to someday determine the state of offline devices by reverse engineering the profile of their power usage over time (along with a feed of online device statuses).

    • Thanks Adam!

      I remember a smart home monitor coming out that claimed it could tell which appliances were in use by monitoring the whole house power usage. Not sure what it was called, or whether it worked.

      If you’re looking for something a bit cheaper than z-wave, I’d take a look at TP-Link or even some Xiaomi smart switches. Having power level stats on individual devices is amazing, especially when you can graph them and get carried away.

  • StePhan Mckillen

    Got It work Thanks

    Got send a message to my media center

    I have Custom UI installed
    Showing the last change

    what I would like to is Hide that if the machine is Idle

    • You could add the machine to a group, so it appears in a card in the UI.

      Then have an automation. When the input_select changes from Idle, it sets group_visibility to true on the Machines group. When it goes into Idle, it hides the group card from the UI.

      • StePhan Mckillen

        Good idea will do that

  • brillepille

    Is this safe?
    I’m on thin ice here, but simply comparing wattage for the machine and maximum load for the power plug is not enough as the load is partially inductive.
    A google search says that washing machines have a power factor (pf) of around 0.5 or 50%. Your real load could easily be 2x the expected.

  • Coolie “Coolie1101” Trini

    Thanks for sharing this awesome config.

    Got it working, no issues.

    I was wondering if you have any idea how I can implement it for a laundry center (two in one washer/dryer, one plug)

    • I have a washing machine washer/dryer combo in one. All on the one plug. Home Assistant can’t tell if the machine is washing or drying, it just tells us the washing machine is finished and the clothes need to be taken out. Works perfectly.

      • Coolie “Coolie1101” Trini

        Okay, I have been monitoring the energy usage, maybe I can do something with that info (equations) in templates.

        Or maybe just split the power input by adding a second plug/cord, according to the wiring diagram, the Dryer and Washer both have separate circuits joined at the input from the single plug/cord, see attached.

        On another note, just noticed I haven’t received any notifications since this was implemented, on investigating, I saw the attached in the logs:
        https://uploads.disquscdn.com/images/f65782188754ae633a255e9383ec27db261e42d3673338e61b1e73031c10998f.png https://uploads.disquscdn.com/images/ef8ff7f350538a6636cbfe540109fb4633dec3cbd20f8d8023d87b50fed6f32a.png

        I commented out the time for testing.

        condition:
        condition: and
        conditions:
        # – condition: time
        # before: ’23:30:00′
        # after: ’08:30:00′
        – condition: state
        entity_id: group.conjugal_family
        state: ‘home’
        – condition: state
        entity_id: input_select.laundry_center_status
        state: Clean
        – condition: template
        value_template: >-
        {% if states.automation.send_alert_when_laundry_center_is_finished.attributes.last_triggered is not none %}
        {% if as_timestamp(now()) | int – as_timestamp(states.automation.send_alert_when_washing_machine_is_finished.attributes.last_triggered) | int > 1800 %}
        true
        {% else %}
        false
        {% endif %}
        {% else %}
        false
        {% endif %}

  • Pingback: Wi-Fi Smart Plug with Energy Monitoring for Home Assistant()

  • kjellX

    Ive seen this input_select method before, but I don’t know why people want to make it so overly complicated. If you look at the power usage for the cycles, you can easily create a template sensor that updates the status.

    Example (for washing machine, easily adopted for dishwasher)

    etc..

    Just my 2 cents..

    cheers,

    • Nice one!

      There’s a couple of advantages to using input_selects I’ve found

      1. If for whatever reason, the cycle gets out-of-sync (maybe a reboot or something hasn’t restored the right state), there’s an easy way from the UI to update the state.
      2. I’ve found (and this may be fixed in newer versions of Home Assistant) that sometimes, template sensors won’t get updated when they are looking at attributes of a device. So, even though power usage is going up/down in the attributes, because the main state of the entity/switch isn’t changing, the template sensor will never update.

      Cheers

  • poldim

    Phil,

    Have you used nodered at all? I’d like to convert this to an NR flow but not having much luck with making a flow that does similar logic.

    • Yeah I have. In my personal experience, I found the automation firing to be slower than Home Assistant, and flows etc a bit more difficult to work with. Could be because I much prefer to write the code than to visualize it.

      • poldim

        If you feel like sharing what you have, I’d love to see it

        • Nothing to share I’m afraid. I got frustrated and deleted it all 🙁

  • Jon

    Thanks for a very nice guide!
    I have one question about the door sensor, how have you set up the binary_sensor in Home Assistant?

    • Thanks Jon,

      What do you mean by how? Currently one is a Fibaro Door Window Sensor while the other is just a Xiaomi one.

      The device_class is set to door, so it appears as Open/Closed in the front end.

  • Koen Wijnstok

    This definitely made my day! I have been struggling with the washing machine. I have used your script as a basis and changed it. I don’t have a power plug, but I use a Xiaomi / Aqara Vibration sensor and I just measure the intensity of vibrations.
    The first time my Sonos was speaking “Hello this is the Home Assistant, the washing machine is done” was brilliant!

  • David Gulbrandsen

    Hi Phil, first of all thanks for this amazing post! Im trying to get the dishwasher part to work and im struggling with my dishwasher not to consume power when in clean state (so standby power = 0), so it goes from drying to dirty. Any ideas of how I can improve it to work with my dishwasher?

    • Hey David,

      Sounds like you’re in the same situation as me. I use a door/window sensor on my dishwasher now as well. So once power drops to zero, it remains in clean state until the dishwasher door is opened. This ensures that house knows the right state of the dishes!

      • David Gulbrandsen

        Ok:( my dishwasher is integrated into the kitchen so not able to fit a door sensor. Any other suggestions?

      • David Gulbrandsen

        Ok:( my dishwasher is integrated into the kitchen so not able to fit a door sensor. Any other suggestions?

        • Oh awesome! I was actually struggling to think of something other than a door sensor that would work. But glad you got it to work!!

  • John

    This is fantastically written. I took what you did and simplified application to the dryer. I won’t say I fully understand the notification section, especially the if state.automation.send_alert_when_dryer_is_finished….. part but this is what I have and sits in the Dry sate and never alerts. So goes from Idle to Running to Dry and sits but doesn’t execute the notification which also sets back to Idle as opposed to using the sensors on the door. Thoughts?

    – id: dryer_alert_finished
    alias: “[Dryer] Send alert when dryer is finished”
    trigger:
    – platform: state
    entity_id: sensor.dryer_status
    to: Dry
    for:
    minutes: 1
    – platform: state
    entity_id: device_tracker.sue_s_iphone_unifi
    to: ‘home’
    for:
    minutes: 2
    – platform: state
    entity_id: device_tracker.john_s_iphone_unifi
    to: ‘home’
    for:
    minutes: 2
    – platform: time
    at: ’08:45:00′
    condition:
    condition: and
    conditions:
    – condition: time
    before: ’22:30:00′
    after: ’06:30:00′
    – condition: state
    entity_id: group.everyone
    state: ‘home’
    – condition: state
    entity_id: input_select.dryer_status
    state: Dry
    – condition: template
    value_template: >
    {% if states.automation.send_alert_when_dryer_is_finished.last_triggered is not none %}
    {% if as_timestamp(now()) | int – as_timestamp(states.automation.send_alert_when_dryer_is_finished.attributes.last_triggered) | int > 1800 %} true {% else %} false
    {% endif %}
    {% else %}
    false
    {% endif %}
    action:
    – service_template: >
    {% if (is_state(‘device_tracker.john_s_iphone_unifi’, ‘home’)) and (is_state(‘device_tracker.sue_s_iphone_unifi’, ‘home’)) %}
    notify.ios_johniosapp
    notify.ios_sueiosapp
    {% elif is_state(‘device_tracker.john_s_iphone_unifi’, ‘home’) %}
    notify.ios_johniosapp
    {% elif is_state(‘device_tracker.sue_s_iphone_unifi’, ‘home’) %}
    notify.ios_sueiosapp
    {% endif %}
    data:
    message: ‘The dryer has finished and is ready to be emptied’
    title: ‘Dryer’
    – service: input_select.select_option
    data:
    entity_id: input_select.dryer_status
    option: Idle

    • Thanks!

      I think as you suspected the entity is causing it to fail. So if you have an entity in your system as automation.dryer_send_alert_when_dryer_is_finished then the condition part should be

      Think that should be the fix you need.

      • John

        Thanks Phil. OK so I’m getting notices but they are failing. So not really getting notices but I think in the HA forums they are saying this can’t be done:

        {% if (is_state(‘device_tracker.john_s_iphone_unifi’, ‘home’)) and (is_state(‘device_tracker.sue_s_iphone_unifi’, ‘home’)) %}
        notify.ios_johniosapp
        notify.ios_sueiosapp

        Don’t know if this is new but they are saying you can’t use two services in a single service call. So my first if statement in the action isn’t valid because its calling two notify services.

        • Yes that’s right. However you can use the notification group component (https://www.home-assistant.io/integrations/notify.group/)

          Your if call will then be three conditions:

          1. If both home, send to the notification group
          2. If only John is home, send to John
          3. If only Sue is home, send to Sue

          • John

            Yeah did you just change that above to: notify.phil_and_helen or was it always that way?

          • Should have always been that way 🙂

          • John

            Yeah didn’t recall if I changed it this way myself and it just never would work or maybe HA changed the way things work. What does your phil_and_helen group look like? Note I keep my groups in their own groups.yaml file. Tried a few permutations but it always errors for some reason. Don’t you have to do some kind of service group?

          • So notification groups are part of the notification platform, so don’t put these in your groups YAML file.

  • John

    Figured I would separate this so it doesn’t get tied into the other entry. I noticed that my washing machine kept changing from Running to Finishing and back to Running again. Not sure if it’s related but only when we are running the washer and/or dryer we get the below in the logs. Any thoughts?

    2019-12-16 06:21:43 WARNING (MainThread) [asyncio] socket.send() raised exception.
    2019-12-16 06:21:43 WARNING (MainThread) [asyncio] socket.send() raised exception.
    2019-12-16 06:21:43 WARNING (MainThread) [asyncio] socket.send() raised exception.
    2019-12-16 06:21:43 WARNING (MainThread) [asyncio] socket.send() raised exception.
    2019-12-16 06:21:43 WARNING (MainThread) [asyncio] socket.send() raised exception.
    2019-12-16 06:46:31 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140022536160336] Client exceeded max pending messages [2]: 512
    2019-12-16 06:46:31 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140022536160336] Client exceeded max pending messages [2]: 512
    2019-12-16 06:46:31 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140022536160336] Client exceeded max pending messages [2]: 512
    2019-12-16 06:46:31 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140022536160336] Client exceeded max pending messages [2]: 512
    2019-12-16 06:46:31 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140022536160336] Client exceeded max pending messages [2]: 512

    • To me that looks like whatever integration you’re using to monitor the power level (so z-wave, zigbee, etc) is flooding Home Assistant with too many updates. HA is struggling to keep up and push updates out to the browsers that are viewing your HA screen.

      At least that’s my theory. I could be completely wrong though

      • John

        You don’t think it has anything to do with the polling intensity do you? Set mine to 1 as you had above.

        • Actually yes that might be the issue as well. Sounds like with the polling set that high, your z-wave device is slamming the network and HASS. Might be best to reduce it to something like 10 to see if that makes a difference

  • John

    Ever since I got to iOS 14 this stopped working. One phone with iOS 13 works and the one with iOS 14 doesn’t. Any idea what may have changed? Been loving this integration. Or the family did even though they first thought it was stupid until they started getting the alerts
    .

    • Hey John,

      I’m guessing you’re referring to not receiving the push notifications about alerts?

      There’s nothing here special, so it sounds like all notifications from Home Assistant would be affected. Might be best to check your iOS settings, and ensure that the Home Assistant app has permissions to draw badges/notifications on your device.

  • James Sweet

    I came up with a simple way of doing this, at least from a software standpoint. My washer and dryer have buzzers that are powered by 120VAC so I found some small relays with 120VAC coils and used quick connect splitters to wire one across the buzzer in each machine. I took apart a cheap wireless door/window sensor, removed the reed switch and ran wires to the relay contacts. Now when the washer or dryer buzzer sounds, the relay also activates and sends a state change via the 433MHz door sensor. Works great, and very simple to set up in Home Assistant.

  • Shane Twentyman

    Sadly, doesn’t look like this works anymore iwth modern HA

    Getting, Message malformed: expected dictionary

    When trying to add the script

    • Yikes can’t believe this article is 4 years old.

      Which script are you trying to add that’s causing the issue?

      • Sean Murray

        I’m getting this error when trying to add the Washing Machine automation.

  • Hey Phil; how about this scenario; the laundry or dryer is done, but none of you where home (or) it is already in the ‘silence’ hours. Would the notification still be triggered the next day when all conditions are true?

    • Hey Gilles!

      Yep, the automations also have a time trigger at 8:30am, so the next morning as long as the conditions are true (washing done, someone home) then the notification is triggered again.

      • tarik

        how could we implement this since “after” for time is not supported in HA anymore?

  • Drew Hansen

    Thanks for this! 4 years later and still holds up. I use node red and was able to transfer the logic easily.

    • Caleb Moore

      Could you share how you transferred the logic to Node Red? I am trying, but I am not very good at NR yet. Edit: Just the notification part I mean. I have everything else working, but I don’t understand some of the notification logic.

  • tarik

    I hope the author still see messages here. I am having an issue with dishwasher Alert automation.
    It keeps sending the alert as soon as we get home whether the dishwasher ran that day or not, any way to make it send alert only if it ran that day and if it did send the alert , not to send it again as soon as one of us is marked “Home” again?
    I thought that’s what the trigger template is supposed to do but I must have done something wrong

    • Hi Tarik!

      There is a check so that the alert won’t be sent at maximum once per 30 minutes. If you only want it to run on the day it was marked as clean, then I would suggest adding this to your automation as a condition


      - condition: template
      value_template: >
      {% if states.input_select.dishwasher_status.last_changed is not none %}
      {{ states.input_select.dishwasher_status.last_changed.date() == now().date() }}
      {% else %}
      false
      {% endif %}

      That template will only allow the notification to be sent on the day the input_select was last changed, so on the next day the if people arrive home the automation won’t trigger.

      • tarik

        Thank you so much @ph@philhawthorne:disqus . Please don’t deprive us of your amazing automation ideas. Cheers!

  • tarik
    • tarik

      The service template is not working for me for some reason

      • John

        This ever get resolved? Was working fine for years and now having this issue. Probably been this way for months just never got around to looking at it so must be related to an HA update. The else recommendation isn’t ideal as that would disregard the waiting until someone home functionality if it’s going to automatically alert a selected person no matter what.

    • Looks like your conditions aren’t being met, and its returning an empty string. You can put the template into Developer Tools -> Templates to see what it renders live.

      My guess is that it triggered when neither of your device trackers were marked as home, so it didn’t know who to send the alert to.

      I would suggest adding


      {% else %} notify.tarik

      This way even if it can’t work out who to send to, it will fall back to your phone and not break the service call.

  • Johnny Mercado

    Excellent!!! I was able to integrate my washing machine with these instructions. I am new to Home Assistant and was wondering if you could help me. I would like to see the way to repeat notifications up to a maximum of 3 times (15min, 30, min 60min) or that the door of the washing machine opens. The 30min and 60min notifications after the cycle ends should say another message. I hope not to disturb you with my message and thank you for your excellent work.

    • Hey Johnny great to hear!

      It might be easiest to just add a delay after the first notification, something like:

      This will notify 15min, 30min and then 60min after the first notification. After each delay, we check if the washing machine is still clean, and if so alert again, then delay again.

      • Johnny Mercado

        Thank Phil for all your help!!!!

  • Adrian

    Thank you so much. I used a good portion of your code to notify me when my washing machine is done. I dont have a door sensor so ammended it there. I also copied it notify me when my motion sensor flood lights turn. Thanks to peeople like you, it’s what makes Home Assistant so great.

  • James Miller

    More than five years in, this is still one of my most useful home automations. Thanks Phil. Question, today in 2023 with all the advancements to Home Assistant over the past 6 years, would you build this differently? For example, it seems like this could be built as a single blueprint rather a collection of automation?

    • Thanks James!

      Great question. To be honest I have been thinking about making an updated version of this post, because you’re right. There have been a lot of advancements in Home Assistant that would greatly change things here.

      As the old “if it ain’t broke don’t fix it” goes, I am still using the same logic described in my blog post above. What would I change today if I was doing it from scratch? I’d probably try to remove the dependence on automations, using template triggers where possible.

      I wish Blueprints were more than just automations. It would be awesome to see whole packages of automations/sensors that could be bundled and shared via the UI for ease. But alas for now it will still be blog posts and gists for sharing things like that for now.

Start typing and press Enter to search