Last active
August 5, 2024 04:41
-
-
Save Fiser12/c24ef99b0b0c5391f5cca33ba499c789 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: Zigbee2MQTT - WXKG02LM_rev2 2 button remote | |
description: Automate your WXKG02LM_rev2 using Zigbee2MQTT events. | |
domain: automation | |
input: | |
mqtt_topic: | |
name: MQTT Topic | |
description: The MQTT topic to subscribe to for button presses | |
default: 'zigbee2mqtt/[ESTUDIO] Escritorio Botón/action' | |
selector: | |
text: {} | |
button_single_right_press: | |
name: Button Right (single press) | |
description: Action to run on button Right single press | |
default: [] | |
selector: | |
action: {} | |
button_double_right_press: | |
name: Button Right (double press) | |
description: Action to run on button Right double press | |
default: [] | |
selector: | |
action: {} | |
button_hold_right_press: | |
name: Button Right (long press) | |
description: Action to run on button Right long press | |
default: [] | |
selector: | |
action: {} | |
button_single_left_press: | |
name: Button Left (single press) | |
description: Action to run on button Left single press | |
default: [] | |
selector: | |
action: {} | |
button_double_left_press: | |
name: Button Left (double press) | |
description: Action to run on button Left double press | |
default: [] | |
selector: | |
action: {} | |
button_hold_left_press: | |
name: Button Left (long press) | |
description: Action to run on button Left long press | |
default: [] | |
selector: | |
action: {} | |
button_single_both_press: | |
name: Button Both (single press) | |
description: Action to run on button Both single press | |
default: [] | |
selector: | |
action: {} | |
button_double_both_press: | |
name: Button Both (double press) | |
description: Action to run on button Both double press | |
default: [] | |
selector: | |
action: {} | |
button_hold_both_press: | |
name: Button Both (long press) | |
description: Action to run on button Both long press | |
default: [] | |
selector: | |
action: {} | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: mqtt | |
topic: !input mqtt_topic | |
action: | |
- variables: | |
command: '{{ trigger.payload }}' | |
- choose: | |
- conditions: | |
- '{{ command == "single_right" }}' | |
sequence: !input 'button_single_right_press' | |
- conditions: | |
- '{{ command == "double_right" }}' | |
sequence: !input 'button_double_right_press' | |
- conditions: | |
- '{{ command == "hold_right" }}' | |
sequence: !input 'button_hold_right_press' | |
- conditions: | |
- '{{ command == "single_left" }}' | |
sequence: !input 'button_single_left_press' | |
- conditions: | |
- '{{ command == "double_left" }}' | |
sequence: !input 'button_double_left_press' | |
- conditions: | |
- '{{ command == "hold_left" }}' | |
sequence: !input 'button_hold_left_press' | |
- conditions: | |
- '{{ command == "single_both" }}' | |
sequence: !input 'button_single_both_press' | |
- conditions: | |
- '{{ command == "double_both" }}' | |
sequence: !input 'button_double_both_press' | |
- conditions: | |
- '{{ command == "hold_both" }}' | |
sequence: !input 'button_hold_both_press' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment