-
-
Save lumascet/27ee837e28f28f98699e77c81d5f20f0 to your computer and use it in GitHub Desktop.
Aqara aq3 blueprint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: ZHA - Aqara Wireless Mini Switch | |
description: Automate your Xiaomi Aqara Wireless Mini Switch using ZHA events. | |
domain: automation | |
input: | |
aqara_mini_switch: | |
name: Aqara Wireless Mini Switch | |
description: Aqara Wireless Mini Switch to use | |
selector: | |
device: | |
integration: zha | |
manufacturer: LUMI | |
model: lumi.sensor_swit | |
button_single_press: | |
name: Single Press | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
button_double_press: | |
name: Double Press | |
description: Action to run on double press | |
default: [] | |
selector: | |
action: {} | |
button_long_press: | |
name: Long Press | |
description: Action to run when button is long pressed (held down) | |
default: [] | |
selector: | |
action: {} | |
button_released: | |
name: Released | |
description: Action to run when button is released after a long press | |
default: [] | |
selector: | |
action: {} | |
button_shaken: | |
name: Shake | |
description: Action to run when shaken | |
default: [] | |
selector: | |
action: {} | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: event | |
event_type: zha_event | |
event_data: | |
device_id: !input 'aqara_mini_switch' | |
action: | |
- variables: | |
command: '{{ trigger.event.data.command }}' | |
- choose: | |
- conditions: | |
- '{{ command == ''single'' }}' | |
sequence: !input 'button_single_press' | |
- conditions: | |
- '{{ command == ''double'' }}' | |
sequence: !input 'button_double_press' | |
- conditions: | |
- '{{ command == ''hold'' }}' | |
sequence: !input 'button_long_press' | |
- conditions: | |
- '{{ command == ''release'' }}' | |
sequence: !input 'button_released' | |
- conditions: | |
- '{{ command == ''shake'' }}' | |
sequence: !input 'button_shaken' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment