Last active
September 30, 2024 01:21
-
-
Save Grooviee/14a8f9f44977585cc279adebf3ccdc5d to your computer and use it in GitHub Desktop.
This file contains 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 - Xiaomi Aqara Wireless Mini Switch (WXKG11LM) | |
description: Automate your Xiaomi Aqara Wireless Mini Remote Switch using ZHA events. Based on the blueprint from carlosmesquita | |
domain: automation | |
input: | |
mijia_square_switch: | |
name: Aqara Wireless Square Switch | |
description: Aqara Wireless Square Switch to use | |
selector: | |
device: | |
filter: | |
integration: zha | |
manufacturer: LUMI | |
model: lumi.sensor_switch.aq2 | |
multiple: false | |
remote_button_short_press: | |
name: Single Press | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
remote_button_double_press: | |
name: Double Press | |
description: Action to run on double press | |
default: [] | |
selector: | |
action: {} | |
remote_button_triple_press: | |
name: Triple Press | |
description: Action to run on triple press | |
default: [] | |
selector: | |
action: {} | |
remote_button_quadruple_press: | |
name: Quadruple Press | |
description: Action to run on quadruple press | |
default: [] | |
selector: | |
action: {} | |
remote_button_multiple_press: | |
name: Multiple Press | |
description: Action to run on multiple press | |
default: [] | |
selector: | |
action: {} | |
source_url: https://community.home-assistant.io/t/zha-xiaomi-aqara-wireless-mini-switch-wxkg11lm-lumi-sensor-switch-aq2/261520 | |
mode: parallel | |
max_exceeded: silent | |
trigger: | |
- platform: event | |
event_type: zha_event | |
event_data: | |
device_id: !input mijia_square_switch | |
action: | |
- variables: | |
args_val: "{{ trigger.event.data.args.attribute_value }}" | |
- choose: | |
- conditions: | |
- "{{ trigger.event.data.args.attribute_value == 0 }}" | |
sequence: !input remote_button_short_press | |
- conditions: | |
- "{{ args_val == 2 }}" | |
sequence: !input remote_button_double_press | |
- conditions: | |
- "{{ args_val == 3 }}" | |
sequence: !input remote_button_triple_press | |
- conditions: | |
- "{{ args_val == 4 }}" | |
sequence: !input remote_button_quadruple_press | |
- conditions: | |
- "{{ args_val == 'lumi.sensor_switch.aq2' }}" | |
sequence: !input remote_button_multiple_press |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment