Blue print to work with Aqara vibration sensor for automation to trigger notification or other action when Dishwasher or washing Machine is done

Blue print to work with Aqara vibration sensor for automation to trigger notification or other action when Dishwasher or washing Machine is done.
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

modified from @ Sbyx power sensor blueprint.

11

blueprint:
  name: Appliance has finished shaking
  description: Do something when an appliance (like a washing machine or dishwasher)
    has finished as detected by a vibration sensor.
  domain: automation
  input:
    vibration_sensor:
      name: Vibration Sensor
      description: 'Vibration sensor entity (e.g.  Aqara lumi.vibration.aq1
by LUMI vibration sensor). Needs to have device_class:
        vibration'
      selector:
        entity:
          domain: binary_sensor
          device_class: vibration
    starting_hysteresis:
      name: Starting hysteresis
      description: Time duration the sensor has to stay on.
      default: 5
      selector:
        number:
          min: 1.0
          max: 60.0
          unit_of_measurement: min
          mode: slider
          step: 1.0
    finishing_hysteresis:
      name: Finishing hysteresis
      description: Time duration the sensor has to stay off.
      default: 5
      selector:
        number:
          min: 1.0
          max: 60.0
          unit_of_measurement: min
          mode: slider
          step: 1.0
    actions:
      name: Actions
      description: Actions (e.g. pushing a notification, TTS announcement, ...)
      selector:
        action: {}
trigger:
- platform: state
  entity_id: !input 'vibration_sensor'
  to: 'on'
  for:
    minutes: !input 'starting_hysteresis'
condition: []
action:
- wait_for_trigger:
  - platform: state
    entity_id: !input 'vibration_sensor'
    to: 'off'
    for:
      minutes: !input 'finishing_hysteresis'
- choose: []
  default: !input 'actions'
mode: single
max_exceeded: silent
15 Likes

I was wondering what people use this blueprint for.
Having attached a vibration sensor to a washing machine maybe? Will it work in terms of sensitivity?

I placed one on the drum itself worked great

Same here. Placed one on the drum, it work like a charm :

Before, I tried to put it on the washing machine (outside) but the vibrations were not “recognized”.

Thanks Rod_Poplarchick for this blue print !

4 Likes

I have one on the flap of the litterboxes so I get a notification when one of them went and I have to clean. But also to keep track of the times they went.

4 Likes

I’m new to HA and I spent a ton of time trying to figure out this automation. Between the blue print and the idea to attach the sensor to the drum, I have a working automation. Thank you ! ! ! Washing machine was so much easier with a zigbee power plug but the Dryer is electric and uses a 30amp connection.

Hi Florius,
Can you share your configuration? I’m interested to this application too.
Thanks

Would like to know that as well!

Did you increase the sensitivity?

2 Likes

Almost trashed mine because I thought they were useless. Thanks for this link.

Why do you trigger it on the ‘on’ state and not just on the ‘off’ state?

Btw. I will try this as soon as I get the sensor:

alias: Laundry - Status (Timer)
description: ''
trigger:
  - platform: state
    entity_id: sensor.laundry
    from: 'off'
    to: 'on'
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: sensor.laundry
            state: 'on'
        sequence:
          - service: timer.cancel
            data: {}
            target:
              entity_id: timer.laundry
      - conditions:
          - condition: state
            entity_id: sensor.laundry
            state: 'off'
        sequence:
          - service: timer.start
            data: {}
            target:
              entity_id: timer.laundry
    default: []
mode: single

Whereas the timer will have a certain time (tbd). Maybe it needs a second timer to avoid a trigger if the machine stands still for too long mid cycle.

I the timer goes idle I will get a notification.

Thank you @Rod_Poplarchick . Here is a gist with your blueprint for easy import.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Not sure why you made a new one
There was one already.
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Because I am blind and did not see it :man_facepalming:

1 Like

@Rod_Poplarchick love your blueprint, and have it working nicely with my D1 mini and SW-420 vibration sensor. Is it possible to add a time condition into the blueprint, to prevent the action within designated times?

I tried editing the blueprint once downloaded but haven’t got it right (generates a log error), but this might be a feature others would use too.

I often run the dryer overnight (cheaper power) and don’t really need to know it’s finished at 2AM, so not triggering between say 2300 - 0700 would be ideal.

condition: time
before: "23:00:00"
after: "07:00:00"
weekday:
  - mon
  - tue
  - wed
  - thu
  - fri
  - sat
  - sun

I’d written my own automation but was struggling with managing the hysterisis element. [My sensor is case mounted so only generates intermittent pulses when running; “on” is pulses for > 2 mins, “off” if no pulses for > 5 mins after an “on” period. This has so far eliminated false triggering from door opening and cupboard access.]

Prob would be best to Just use conditions in HA front end editor.

I believe this will work.

alias: scheduled washer notification
description: ""
use_blueprint:
  path: >-
    Rod_Poplarchick/blue-print-to-work-with-aqara-vibration-sensor-for-automation-to-trigger-notification-or-other-action-when-dishwasher-or-washing-machine-is-done.yaml
  input:
    vibration_sensor: binary_sensor.vibration_sensor
    actions:
      - condition: time
        before: "21:00:00"
        after: "09:00:00"
        weekday:
          - sun
          - sat
          - fri
          - thu
          - wed
          - tue
          - mon
      - service: input_boolean.turn_on
        data: {}
        target:
          entity_id: input_boolean.washer_done


1 Like

Thanks Rod - looks great, I’ll give it a shot.

I’ve got two of these sensors - one on my dishwasher, one on my washing machine. I can see the sensors in ZHA, can see in the logs when they are acknowledging vibrations, but I have yet for either of the automations I created to fire. I’m not sure what I’m doing wrong.

alias: Washing Machine done
description: ""
use_blueprint:
  path: >-
    Rod_Poplarchick/blue-print-to-work-with-aqara-vibration-sensor-for-automation-to-trigger-notification-or-other-action-when-dishwasher-or-washing-machine-is-done.yaml
  input:
    vibration_sensor: binary_sensor.lumi_lumi_vibration_aq1_iaszone
    actions:
      - service: media_player.play_media
        target:
          entity_id: media_player.speakers
        data:
          media_content_id: >-
            media-source://tts/google_translate?message=The+washing+machine+is+done+running.
          media_content_type: provider
        metadata:
          title: The washing machine is done running.
          thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
          media_class: app
          children_media_class: null
          navigateIds:
            - {}
            - media_content_type: app
              media_content_id: media-source://tts
            - media_content_type: provider
              media_content_id: >-
                media-source://tts/google_translate?message=The+washing+machine+is+done+running.
      - device_id: 875ea954085c99a9f49979e4fb951b72
        domain: mobile_app
        type: notify
        message: The washing machine is done.
        title: Alert!

The dishwasher is basically identical, just calling that sensor and a slightly different TTS message.

Please advise if I can provide anything further that might assist in troubleshooting.

Thanks!