Created
November 12, 2021 16:46
-
-
Save revin34/1eeddf85cac85ff6e867abfa602d42eb to your computer and use it in GitHub Desktop.
home assistant blueprint for button Xiaomi WXKG11LM
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: Aqara Wireless Switch (single, double, triple, quadruple) | |
description: 'Control anything using Aqara Wireless Switch. https://community.home-assistant.io/t/zigbee2mqtt-aqara-wireless-switch-single-double-triple-quadruple/258789/1' | |
domain: automation | |
input: | |
switch: | |
name: Switch | |
description: Action sensor of Aqara Wireless Switch to use | |
selector: | |
entity: | |
domain: sensor | |
integration: mqtt | |
press_single: | |
name: Single button press | |
description: Action to run on single button press | |
default: [] | |
selector: | |
action: {} | |
press_double: | |
name: Double button press | |
description: Action to run on double button press | |
default: [] | |
selector: | |
action: {} | |
press_triple: | |
name: Triple button press | |
description: Action to run on double triple press | |
default: [] | |
selector: | |
action: {} | |
press_quadruple: | |
name: Quadruple button press | |
description: Action to run on double quadruple press | |
default: [] | |
selector: | |
action: {} | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: state | |
entity_id: !input switch | |
attribute: click | |
action: | |
- variables: | |
command: "{{ trigger.to_state.state }}" | |
- choose: | |
- conditions: | |
- "{{ command == 'single' }}" | |
sequence: !input press_single | |
- conditions: | |
- "{{ command == 'double' }}" | |
sequence: !input press_double | |
- conditions: | |
- "{{ command == 'triple' }}" | |
sequence: !input press_triple | |
- conditions: | |
- "{{ command == 'quadruple' }}" | |
sequence: !input press_quadruple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment