Skip to content

Instantly share code, notes, and snippets.

@xpavli44
Last active August 18, 2022 08:13
Show Gist options
  • Save xpavli44/7d119b83d99b5e24086a6d4602f220ee to your computer and use it in GitHub Desktop.
Save xpavli44/7d119b83d99b5e24086a6d4602f220ee to your computer and use it in GitHub Desktop.
Blue print to work with Aqara vibration sensor for automation to trigger notification or other action when Dishwasher or washing Machine is done. Credits to https://community.home-assistant.io/t/blue-print-to-work-with-aqara-vibration-sensor-for-automation-to-trigger-notification-or-other-action-when-dishwasher-or-washing-machine-is-done/282553
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment