Smart Alerts for Your Washing Machine with Home Assistant

Smart Alerts for Your Washing Machine with Home Assistant

Keeping track of your laundry can be a hassle, but with Home Assistant, you can set up smart alerts to notify you when your washing machine starts and when it’s almost done. This guide will show you how to set up these alerts using a WiFi-enabled washing machine, specifically the Midea MF200W90WBW. However, this automation can be adapted for any WiFi device.

Getting Started

First, ensure your washing machine is integrated with Home Assistant. The Midea MF200W90WBW uses the Midea AC LAN integration. Once you have your device set up, you can create an automation to send alerts to your phone.

Home Assistant Automation

The following automation will send a notification to your phone when the washing machine starts and when it’s almost done. Here’s the code:

alias: Washing machine alerts
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.washing_machine_time_remaining
    for:
      hours: 0
      minutes: 0
      seconds: 0
    below: 2
    id: AlertOff
  - platform: state
    entity_id:
      - sensor.washing_machine_progress
    to: Wash
    id: AlertOn
    enabled: true
    from: Weight
  - platform: state
    entity_id:
      - sensor.washing_machine_progress
    to: Wash
    id: AlertOn
    enabled: true
    from: unavailable
condition: []
action:
  - if:
      - condition: trigger
        id:
          - AlertOn
    then:
      - wait_template: "{{states('sensor.washing_machine_time_remaining') | float(0)}}"
        continue_on_timeout: false
        timeout: "300"
  - choose:
      - conditions:
          - condition: trigger
            id:
              - AlertOff
        sequence:
          - service: notify.mobile_app_yoav_s_phone
            data:
              title: washing machine done
              message: washing machine is done
            enabled: true

      - conditions:
          - condition: trigger
            id:
              - AlertOn
        sequence:
          - service: notify.mobile_app_yoav_s_phone
            data:
              title: washing machine started
              message: >-
                washing machine started.
                {{states('sensor.washing_machine_time_remaining')}} remaining
            enabled: true

  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
mode: single

Understanding the Automation

This automation consists of triggers and actions:

  • Triggers: The automation triggers when the washing machine starts (sensor.washing_machine_progress changes to “Wash”) or when the remaining time goes below 2 minutes.
  • Actions: The actions send a notification to your phone. The initial “if” condition ensures the time_remaining sensor has started ticking before sending the “started” alert.

Customizing the Automation

You can customize the automation to suit your device and preferences. For example, you might remove the initial “if” condition if your device doesn’t need a delay for the time_remaining sensor to update.

Conclusion

With this automation, you’ll never have to wonder about the status of your laundry again. Home Assistant makes it easy to set up smart alerts for any WiFi-enabled device, ensuring you stay informed and efficient.


Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply