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

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!

Have you used the traces in automation to see where it is stopping.
Very helpful
Click on the trace timeline
If error it will tell you

@Britespark I just wanted to note that you should not run dryers during the night (i.e when you sleep). They are one of the most common reasons for fire nowadays, and at least in my country (Norway) the fire departments have seen a spike in more serious fires because of them (and people noticing them too late).

@Rod_Poplarchick I’ve been searching for a solution to my automation issue and think this blueprint can help. I’m having issues with it, however, because I’m using a Smartthings multi sensor and the blueprint doesn’t recognize it. I tried to edit it but I got an error Missing input definition for moving… Could you provide any insight.

Sorry I don’t have anything smart things or any other cloud based devices
So I would not know where to start

Remove

          device_class: vibration

from the ‘vibration_sensor’ section and see if you can find the sensor. The list will be longer. Your sensor MAY not be of device_class vibration.
You could also do a custom on it and change the class to vibration, but that one is a guess…

It still must be an input_boolean in order to work in the BP.

1 Like

I have found this to be a very common request, and pretty easy to add in the BP.
Feel Free to copy if you like…

1 Like

Thank you! I was able to get it working. I guess it was what you posted here but I didn’t see the specific option I changed in the article. I changed the “show as” option in the entities settings to vibration which then allowed the blueprint to see it and it worked perfectly. So to anyone else, this blueprint will work with the Smartthings/Aeotec multi-sensor, you just need to change that setting.

3 Likes

Just curious if anyone here is running this with zigbee2mqtt and if so what do you have your sensor timeout set to?

1 Like

Did you ever figure out a good answer on this? Wondering the same thing.

So the Aqara sensor never worked well so I switched to the TuYa TS0210 control via MQTT | Zigbee2MQTT which works like a charm using 10sec sensor timeout.

I am using a thirdreality vibration sensor brought in through z2m and attempting to use it to alert when the dryer is done. This blueprint sees the device so I suspect it would work as expected.

But rather than having it trigger a notification, what I would like to do is have it toggle an input_boolean on when the dryer starts and then off when it ends. I want to pass this input_boolean to alexa and use the alexa app to announce the dryer has finished.

I want to do it this way because currently the Alexa Media Player integration has had some problems of late and I’d prefer to just pass the job over and not have to worry about it.

That being said, it is obvious how to turn off the input_boolean. But I need help with turning it on when the sensor first detects the motion. This blueprint has a “pre-action” section:

Is it as simple as adding that same concept in for the one shared in this thread?