Last active
March 1, 2024 20:56
-
-
Save webartoli/493f600dae1d054371267b6d6927e117 to your computer and use it in GitHub Desktop.
ZHA - Aqara Wireless Double Rocker WXKG02LM
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 - Aqara Wireless Double Rocker WXKG02LM | |
description: | |
Automate your Xiaomi Aqara Wireless Double Rocker WXKG02LM using ZHA | |
events. | |
domain: automation | |
input: | |
aqara_switch: | |
name: Select the switch | |
description: Aqara Wireless Double Rocker WXKG02LM | |
selector: | |
device: | |
integration: zha | |
manufacturer: LUMI | |
model: lumi.sensor_86sw2 | |
entity: | |
- domain: | |
- sensor | |
device_class: | |
- battery | |
multiple: false | |
button_single_press_left: | |
name: Single Press Left | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
button_single_press_right: | |
name: Single Press Right | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
button_single_press_both: | |
name: Single Press Both Buttons | |
description: Action to run on single presses | |
default: [] | |
selector: | |
action: {} | |
source_url: https://gist.github.com/webartoli/493f600dae1d054371267b6d6927e117 | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: event | |
event_type: zha_event | |
event_data: | |
device_id: !input aqara_switch | |
action: | |
- variables: | |
button: "{{ trigger.event.data.endpoint_id }}" | |
- choose: | |
- conditions: | |
- "{{ button == 1 }}" | |
sequence: !input button_single_press_left | |
- conditions: | |
- "{{ button == 2 }}" | |
sequence: !input button_single_press_right | |
- conditions: | |
- "{{ button == 3 }}" | |
sequence: !input button_single_press_both |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment