Hi, this is a post for me to test out how things work. Please ignore this.
If you do want to reply, I am looking for good resources for learning about home assistant.
blueprint:
name: ZHA - Tuya 1-Button Scene Switch
description: Automate your Tuya 1-Button Scene Switch using ZHA events.
domain: automation
input:
tuya_1button_scene_switch:
name: Tuya 1-Button Scene Switch
description: Tuya 1-Button Scene Switch to use
selector:
device:
integration: zha
manufacturer: _TZ3000_qgwcxxws
model: TS0041
button_one_short_press:
name: Single Press
description: Action to run on button 1 (left) single press
default: []
selector:
action: {}
button_one_double_press:
name: Double Press
description: Action to run on button 1 left) double press
default: []
selector:
action: {}
button_one_long_press:
name: Long Press
description: Action to run on button 1 (left) long press
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input 'tuya_1button_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: "{{ command == 'remote_button_double_press' }}"
sequence:
- choose:
- conditions: '{{ endpoint_id == 1 }}'
sequence: !input 'button_one_double_press'
- conditions: "{{ command == 'remote_button_long_press' }}"
sequence:
- choose:
- conditions: '{{ endpoint_id == 1 }}'
sequence: !input 'button_one_long_press'