Last active
January 4, 2024 20:02
-
-
Save codrin-iftimie/675eb986c81a19d07d88a0cd102f62d1 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 - Tuya Moes Smart Knob (Operation Mode = event) | |
description: Automate your Tuya Smart Knob - ERS-10TZBVK-AA | |
domain: automation | |
input: | |
mode: | |
name: Automation Modes | |
description: "https://www.home-assistant.io/docs/automation/modes/" | |
default: parallel | |
selector: | |
select: | |
mode: dropdown | |
options: | |
- single | |
- restart | |
- queued | |
- parallel | |
switch: | |
name: Tuya Smart Knob | |
description: Tuya Smart Knob used as Button | |
selector: | |
device: | |
button_short_press: | |
name: Single Press | |
description: Action to run on single press (careful not to turn knob instead) | |
default: [] | |
selector: | |
action: {} | |
button_double_press: | |
name: Double Press | |
description: Action to run on double press (careful not to turn knob instead) | |
default: [] | |
selector: | |
action: {} | |
button_long_press: | |
name: Long Press | |
description: Action to run on long press (at least 4 seconds - careful not to turn knob instead) | |
default: [] | |
selector: | |
action: {} | |
button_rotate_right: | |
name: Rotate Right | |
description: Action to run when Smart Knob is rotated right | |
default: [] | |
selector: | |
action: {} | |
button_rotate_left: | |
name: Rotate Left | |
description: Action to run when Smart Knob is rotated left | |
default: [] | |
selector: | |
action: {} | |
source_url: https://community.home-assistant.io/t/zigbee2mqtt-tuya-moes-smart-knob-ers-10tzbvk-aa/419989 | |
mode: !input mode | |
max_exceeded: silent | |
trigger: | |
- platform: device | |
domain: tuya | |
device_id: !input "switch" | |
action: | |
- variables: | |
command: "{{ trigger.to_state.state }}" | |
- choose: | |
- conditions: | |
- "{{ command == 'single' }}" | |
sequence: !input "button_short_press" | |
- conditions: | |
- "{{ command == 'double' }}" | |
sequence: !input "button_double_press" | |
- conditions: | |
- "{{ command == 'hold' }}" | |
sequence: !input "button_long_press" | |
- conditions: | |
- "{{ command == 'rotate_right' }}" | |
sequence: !input "button_rotate_right" | |
- conditions: | |
- "{{ command == 'rotate_left' }}" | |
sequence: !input "button_rotate_left" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment