This is a blueprint for the HANK Electronics HKZW-SCN04 4 button scene controller.
EDIT: This blueprint is written to work with the Z-Wave (depricated) integration - old Z-Wave integration. See below for work and pre-release version that works with Z-Wave JS.
After reading thru several other scene controller blueprints I saw the value of consolidating several automations into one and decided I’d give it a shot since I have 2 of these excellent gadgets and have 8 stand-alone automations taking up space in my config.
This is a completely derivative work and started out life as a copy from @rule’s blueprint Remotec ZRC-90 Scene Master 8 button remote (zwave-js)
blueprint:
name: "Z-Wave Scene Controller HANK Electronics HKZW-SCN04"
description: Create automations for the HANK Electronics HKZW-SCN04 4 button scene controller using the ZWAVE integration.
domain: automation
input:
hkzw_scn04:
name: HANK Electronics scene controller
description: "List of available HANK Electronics HKZW-SCN04 scene controllers.
This list is only a reference. At this time, it is not possible
to obtain the node's id using the device selector."
selector:
device:
integration: zwave
manufacturer: HANK Electronics Ltd
model: HKZW-SCN04 Scene Controller
zwave_node_id:
name: Node ID
description: "Enter the node id for an available HKZW-SCN04 scene controller you wish
to configure. This is the node_id field of the event zwave.scene_activated"
button_1_1:
name: Button 1 (Moon and Star) - Up/On press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
button_1_held:
name: Button 1 (Moon and Star) - Held down
description: "Action to run, when the button is held down."
default: []
selector:
action: {}
button_2_1:
name: Button 2 (People) - Up/On press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
button_2_held:
name: Button 2 (People) - Held down
description: "Action to run, when the button is held down."
default: []
selector:
action: {}
button_3_1:
name: Button 3 (Circle with Line) - Up/On press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
button_3_held:
name: Button 3 (Circle with Line) - Held down
description: "Action to run, when the button is held down."
default: []
selector:
action: {}
button_4_1:
name: Button 4 (Circle) - Up/On press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
button_4_held:
name: Button 4 (Circle) - Held down
description: "Action to run, when/ the button is held down."
default: []
selector:
action: {}
mode: single
max_exceeded: silent
variables:
zwave_node_id: !input zwave_node_id
trigger:
- platform: event
event_type: zwave.scene_activated
condition: "{{ trigger.event.data.node_id == (zwave_node_id | int) }}"
action:
- variables:
scene_id: "{{ trigger.event.data.scene_id }}"
scene_data: "{{ trigger.event.data.scene_data }}"
- choose:
- conditions: "{{ scene_id == 1 and scene_data == 0}}"
sequence: !input button_1_1
- conditions: "{{ scene_id == 1 and scene_data == 2}}"
sequence: !input button_1_held
- conditions: "{{ scene_id == 2 and scene_data == 0}}"
sequence: !input button_2_1
- conditions: "{{ scene_id == 2 and scene_data == 2}}"
sequence: !input button_2_held
- conditions: "{{ scene_id == 3 and scene_data == 0}}"
sequence: !input button_3_1
- conditions: "{{ scene_id == 3 and scene_data == 2}}"
sequence: !input button_3_held
- conditions: "{{ scene_id == 4 and scene_data == 0}}"
sequence: !input button_4_1
- conditions: "{{ scene_id == 4 and scene_data == 2}}"
sequence: !input button_4_held
BTW - First post ever here on the HA Community site so please go easy on me if I mangle the links.
Net Giant