-
-
Save azhang/e72a442bb12cefce449655761c5a7ccd to your computer and use it in GitHub Desktop.
Zigbee2MQTT - Tuya 1-button Scene Switch (TS0041)
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: Zigbee2MQTT - Tuya 1-Button Scene Switch | |
| description: Automate your Tuya 1-Button Scene Switch via Zigbee2MQTT. | |
| domain: automation | |
| input: | |
| switch: | |
| name: Button Device | |
| description: Select your button | |
| selector: | |
| device: | |
| integration: mqtt | |
| button_one_short_press: | |
| name: Single Press | |
| default: [] | |
| selector: | |
| action: {} | |
| button_one_double_press: | |
| name: Double Press | |
| default: [] | |
| selector: | |
| action: {} | |
| button_one_long_press: | |
| name: Long Press | |
| default: [] | |
| selector: | |
| action: {} | |
| mode: restart | |
| max_exceeded: silent | |
| trigger: | |
| - platform: device | |
| domain: mqtt | |
| device_id: !input switch | |
| type: action | |
| subtype: single | |
| - platform: device | |
| domain: mqtt | |
| device_id: !input switch | |
| type: action | |
| subtype: double | |
| - platform: device | |
| domain: mqtt | |
| device_id: !input switch | |
| type: action | |
| subtype: hold | |
| action: | |
| - choose: | |
| - conditions: | |
| - "{{ trigger.payload == 'single' }}" | |
| sequence: !input "button_one_short_press" | |
| - conditions: | |
| - "{{ trigger.payload == 'double' }}" | |
| sequence: !input "button_one_double_press" | |
| - conditions: | |
| - "{{ trigger.payload == 'hold' }}" | |
| sequence: !input "button_one_long_press" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment