Created
July 18, 2024 05:06
-
-
Save gautamg795/4c85e0107014362f0c02bf5ac79dffb5 to your computer and use it in GitHub Desktop.
hank 4 button scene controller
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: Hank Four-button Scene Controller | |
description: Create automations for Hank Electronics / Technisat 4-button remote using the ZWave-JS integration | |
domain: automation | |
input: | |
hank_scn04: | |
name: Hank Four-button Controller | |
selector: | |
device: | |
integration: zwave_js | |
manufacturer: HANK Electronics Ltd. | |
model: SCN04 | |
button_1_pressed: | |
name: Button 1 (Sleep icon) Pressed | |
description: Action to run when button is pressed | |
default: [] | |
selector: | |
action: | |
button_1_held: | |
name: Button 1 (Sleep icon) Held Down | |
description: Action to run when button is held | |
default: [] | |
selector: | |
action: | |
button_2_pressed: | |
name: Button 2 (People icon) Pressed | |
description: Action to run when button is pressed | |
default: [] | |
selector: | |
action: | |
button_2_held: | |
name: Button 2 (People icon) Held Down | |
description: Action to run when button is held | |
default: [] | |
selector: | |
action: | |
button_3_pressed: | |
name: Button 3 (Centre button) Pressed | |
description: Action to run when button is pressed | |
default: [] | |
selector: | |
action: | |
button_3_held: | |
name: Button 3 (Centre button) Held Down | |
description: Action to run when button is held | |
default: [] | |
selector: | |
action: | |
button_4_pressed: | |
name: Button 4 (Power icon) Pressed | |
description: Action to run when button is pressed | |
default: [] | |
selector: | |
action: | |
button_4_held: | |
name: Button 4 (Power icon) Held Down | |
description: Action to run when button is held | |
default: [] | |
selector: | |
action: | |
mode: single | |
max_exceeded: silent | |
trigger: | |
platform: event | |
event_type: zwave_js_value_notification | |
event_data: | |
command_class_name: Central Scene | |
device_id: !input hank_scn04 | |
action: | |
- variables: | |
scene_id: "{{ trigger.event.data.property_key_name }}" | |
key_state: "{{ trigger.event.data.value }}" | |
- choose: | |
- conditions: "{{ scene_id == '001' and key_state == 'KeyPressed' }}" | |
sequence: !input button_1_pressed | |
- conditions: "{{ scene_id == '001' and key_state == 'KeyHeldDown' }}" | |
sequence: !input button_1_held | |
- conditions: "{{ scene_id == '002' and key_state == 'KeyPressed' }}" | |
sequence: !input button_2_pressed | |
- conditions: "{{ scene_id == '002' and key_state == 'KeyHeldDown' }}" | |
sequence: !input button_2_held | |
- conditions: "{{ scene_id == '003' and key_state == 'KeyPressed' }}" | |
sequence: !input button_3_pressed | |
- conditions: "{{ scene_id == '003' and key_state == 'KeyHeldDown' }}" | |
sequence: !input button_3_held | |
- conditions: "{{ scene_id == '004' and key_state == 'KeyPressed' }}" | |
sequence: !input button_4_pressed | |
- conditions: "{{ scene_id == '004' and key_state == 'KeyHeldDown' }}" | |
sequence: !input button_4_held |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment