Last active
April 2, 2024 02:49
-
-
Save kevinkucharczyk/9563be0476865327f6290b9c31496245 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 - Tuya 4-Button Scene Switch ("Moes") (_TZ3000_wkai4ga5) | |
description: Automate your Tuya 4-Button Scene Switch using ZHA events. | |
domain: automation | |
input: | |
tuya_4button_scene_switch: | |
name: Tuya 4-Button Scene Switch | |
description: Tuya 4-Button Scene Switch to use | |
selector: | |
device: | |
integration: zha | |
manufacturer: _TZ3000_wkai4ga5 | |
model: TS0044 | |
multiple: false | |
button_one_short_press: | |
name: Button 1 (upper left), single press | |
description: Action to run on button 1 (upper-left) single press | |
default: [] | |
selector: | |
action: {} | |
button_one_double_press: | |
name: Button 1 (upper left), double press | |
description: Action to run on button 1 (upper-left) double press | |
default: [] | |
selector: | |
action: {} | |
button_one_long_press: | |
name: Button 1 (upper left), long press | |
description: Action to run on button 1 (upper-left) long press | |
default: [] | |
selector: | |
action: {} | |
button_two_short_press: | |
name: Button 2 (upper right), single press | |
description: Action to run on button 2 (upper-right) single press | |
default: [] | |
selector: | |
action: {} | |
button_two_double_press: | |
name: Button 2 (upper right), double press | |
description: Action to run on button 2 (upper-right) double press | |
default: [] | |
selector: | |
action: {} | |
button_two_long_press: | |
name: Button 2 (upper right), long press | |
description: Action to run on button 2 (upper-right) long press | |
default: [] | |
selector: | |
action: {} | |
button_three_short_press: | |
name: Button 3 (lower left), single press | |
description: Action to run on button 3 (lower-left) single press | |
default: [] | |
selector: | |
action: {} | |
button_three_double_press: | |
name: Button 3 (lower left), double press | |
description: Action to run on button 3 (lower-left) double press | |
default: [] | |
selector: | |
action: {} | |
button_three_long_press: | |
name: Button 3 (lower left), long press | |
description: Action to run on button 3 (lower-left) long press | |
default: [] | |
selector: | |
action: {} | |
button_four_short_press: | |
name: Button 4 (lower right), single press | |
description: Action to run on button 4 (lower-right) single press | |
default: [] | |
selector: | |
action: {} | |
button_four_double_press: | |
name: Button 4 (lower right), double press | |
description: Action to run on button 4 (lower-right) double press | |
default: [] | |
selector: | |
action: {} | |
button_four_long_press: | |
name: Button 4 (lower right), long press | |
description: Action to run on button 4 (lower-right) long press | |
default: [] | |
selector: | |
action: {} | |
source_url: https://community.home-assistant.io/t/zha-tuya-4-button-scene-switch-ts0044/265099 | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: event | |
event_type: zha_event | |
event_data: | |
device_id: !input tuya_4button_scene_switch | |
action: | |
- variables: | |
command: '{{ trigger.event.data.command }}' | |
endpoint_id: '{{ trigger.event.data.endpoint_id }}' | |
- choose: | |
- conditions: '{{ command == ''remote_button_short_press'' }}' | |
sequence: | |
- choose: | |
- conditions: '{{ endpoint_id == 1 }}' | |
sequence: !input button_one_short_press | |
- conditions: '{{ endpoint_id == 2 }}' | |
sequence: !input button_two_short_press | |
- conditions: '{{ endpoint_id == 3 }}' | |
sequence: !input button_three_short_press | |
- conditions: '{{ endpoint_id == 4 }}' | |
sequence: !input button_four_short_press | |
- conditions: '{{ command == ''remote_button_double_press'' }}' | |
sequence: | |
- choose: | |
- conditions: '{{ endpoint_id == 1 }}' | |
sequence: !input button_one_double_press | |
- conditions: '{{ endpoint_id == 2 }}' | |
sequence: !input button_two_double_press | |
- conditions: '{{ endpoint_id == 3 }}' | |
sequence: !input button_three_double_press | |
- conditions: '{{ endpoint_id == 4 }}' | |
sequence: !input button_four_double_press | |
- conditions: '{{ command == ''remote_button_long_press'' }}' | |
sequence: | |
- choose: | |
- conditions: '{{ endpoint_id == 1 }}' | |
sequence: !input button_one_long_press | |
- conditions: '{{ endpoint_id == 2 }}' | |
sequence: !input button_two_long_press | |
- conditions: '{{ endpoint_id == 3 }}' | |
sequence: !input button_three_long_press | |
- conditions: '{{ endpoint_id == 4 }}' | |
sequence: !input button_four_long_press |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment