Last active
July 5, 2024 14:40
-
-
Save andrew-codechimp/82a317a2fd4c22fce66eeba1192d026a to your computer and use it in GitHub Desktop.
Home Assistant Blueprint Zigbee2MQTT Moes 4 Button Scene Switch
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 Moes 4-Button Scene Switch | |
description: Automate your Moes 4-Button Scene Switch via Zigbee2MQTT. | |
domain: automation | |
source_url: https://gist.github.com/andrew-codechimp/82a317a2fd4c22fce66eeba1192d026a | |
input: | |
switch: | |
name: Moes 4-Button Scene Switch | |
description: Moes 4-Button Scene Switch to use (pick the sensor that end with _action) | |
selector: | |
entity: | |
integration: mqtt | |
domain: sensor | |
button_1: | |
name: Button 1 (top-left) | |
input: | |
button_one_short_press: | |
name: Single Press | |
description: Action to run on button 1 (top-left) single press | |
default: [] | |
selector: | |
action: {} | |
button_one_double_press: | |
name: Double Press | |
description: Action to run on button 1 (top-left) double press | |
default: [] | |
selector: | |
action: {} | |
button_one_long_press: | |
name: Long Press | |
description: Action to run on button 1 (top-left) long press | |
default: [] | |
selector: | |
action: {} | |
button_2: | |
name: Button 2 (top-right) | |
input: | |
button_two_short_press: | |
name: Single Press | |
description: Action to run on button 2 (top-right) single press | |
default: [] | |
selector: | |
action: {} | |
button_two_double_press: | |
name: Double Press | |
description: Action to run on button 2 (top-right) double press | |
default: [] | |
selector: | |
action: {} | |
button_two_long_press: | |
name: Long Press | |
description: Action to run on button 2 (top-right) long press | |
default: [] | |
selector: | |
action: {} | |
button_3: | |
name: Button 3 (bottom-left) | |
input: | |
button_three_short_press: | |
name: Single Press | |
description: Action to run on button 3 (bottom-left) single press | |
default: [] | |
selector: | |
action: {} | |
button_three_double_press: | |
name: Double Press | |
description: Action to run on button 3 (bottom-left) double press | |
default: [] | |
selector: | |
action: {} | |
button_three_long_press: | |
name: Long Press | |
description: Action to run on button 3 (bottom-left) long press | |
default: [] | |
selector: | |
action: {} | |
button_4: | |
name: Button 4 (bottom-right) | |
input: | |
button_four_short_press: | |
name: Single Press | |
description: Action to run on button 4 (bottom-right) single press | |
default: [] | |
selector: | |
action: {} | |
button_four_double_press: | |
name: Double Press | |
description: Action to run on button 4 (bottom-right) double press | |
default: [] | |
selector: | |
action: {} | |
button_four_long_press: | |
name: Long Press | |
description: Action to run on button 4 (bottom-right) long press | |
default: [] | |
selector: | |
action: {} | |
mode: single | |
max_exceeded: silent | |
trigger: | |
- platform: state | |
entity_id: !input "switch" | |
attribute: action | |
to: | |
- "1_single" | |
- "2_single" | |
- "3_single" | |
- "4_single" | |
- "1_double" | |
- "2_double" | |
- "3_double" | |
- "4_double" | |
- "1_hold" | |
- "2_hold" | |
- "3_hold" | |
- "4_hold" | |
action: | |
- variables: | |
command: "{{ trigger.to_state.state }}" | |
- choose: | |
- conditions: | |
- "{{ command == '1_single' }}" | |
sequence: !input "button_one_short_press" | |
- conditions: | |
- "{{ command == '2_single' }}" | |
sequence: !input "button_two_short_press" | |
- conditions: | |
- "{{ command == '3_single' }}" | |
sequence: !input "button_three_short_press" | |
- conditions: | |
- "{{ command == '4_single' }}" | |
sequence: !input "button_four_short_press" | |
- conditions: | |
- "{{ command == '1_double' }}" | |
sequence: !input "button_one_double_press" | |
- conditions: | |
- "{{ command == '2_double' }}" | |
sequence: !input "button_two_double_press" | |
- conditions: | |
- "{{ command == '3_double' }}" | |
sequence: !input "button_three_double_press" | |
- conditions: | |
- "{{ command == '4_double' }}" | |
sequence: !input "button_four_double_press" | |
- conditions: | |
- "{{ command == '1_hold' }}" | |
sequence: !input "button_one_long_press" | |
- conditions: | |
- "{{ command == '2_hold' }}" | |
sequence: !input "button_two_long_press" | |
- conditions: | |
- "{{ command == '3_hold' }}" | |
sequence: !input "button_three_long_press" | |
- conditions: | |
- "{{ command == '4_hold' }}" | |
sequence: !input "button_four_long_press" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment