Created
April 15, 2022 02:59
-
-
Save timcappalli/a1720348a146de3b50e6c6748bf10e06 to your computer and use it in GitHub Desktop.
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: ZWaveJS - Aeotec WallMote Quad scene controller | |
description: | | |
Perform actions when Aeotec WallMote Quad buttons are interacted with. | |
The release action is equivalent to a long tap. | |
A release action is always triggered after a hold action, which makes | |
them a bit tricky to use. The hold action is repeated as long as the | |
button is held down. | |
domain: automation | |
input: | |
zwavejs_device: | |
name: ZWaveJS Device | |
description: The Aeotec WallMote Quad controller to listen for events on. | |
selector: | |
device: | |
integration: zwave_js | |
manufacturer: Aeotec Ltd. | |
model: ZWA003 | |
tap_bottom_big_actions: | |
name: Tap Bottom Actions | |
selector: | |
action: | |
default: [] | |
tap_top_right_actions: | |
name: Tap Top Right Actions | |
selector: | |
action: | |
default: [] | |
tap_top_left_actions: | |
name: Tap Top Left Actions | |
selector: | |
action: | |
default: [] | |
tap_middle_actions: | |
name: Tap Middle Actions | |
selector: | |
action: | |
default: [] | |
release_bottom_big_actions: | |
name: Release Bottom Actions | |
selector: | |
action: | |
default: [] | |
release_top_right_actions: | |
name: Release Top Right Actions | |
selector: | |
action: | |
default: [] | |
release_top_left_actions: | |
name: Release Top Left Actions | |
selector: | |
action: | |
default: [] | |
release_middle_actions: | |
name: Release Middle Actions | |
selector: | |
action: | |
default: [] | |
hold_bottom_big_actions: | |
name: Hold Bottom Actions | |
selector: | |
action: | |
default: [] | |
hold_top_right_actions: | |
name: Hold Top Right Actions | |
selector: | |
action: | |
default: [] | |
hold_top_left_actions: | |
name: Hold Top Left Actions | |
selector: | |
action: | |
default: [] | |
hold_middle_actions: | |
name: Hold Middle Actions | |
selector: | |
action: | |
default: [] | |
mode: single | |
# If you haven't upgraded to 2021.4.0 or newer yet, you'll need to use this trigger code instead | |
#trigger: | |
# - platform: event | |
# event_type: zwave_js_event | |
# event_data: | |
# type: value_notification | |
trigger: | |
- platform: event | |
event_type: zwave_js_value_notification | |
variables: | |
logger: blueprint.zwavejs_scene_activation | |
zwavejs_device: !input zwavejs_device | |
action: | |
- choose: | |
# IF triggered device_id is zwavejs_device id | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.device_id == zwavejs_device }}" | |
- condition: template | |
value_template: "{{ trigger.event.data.command_class_name == 'Central Scene' }}" | |
sequence: | |
- choose: | |
# IF tap top left | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 001' and trigger.event.data.value == 'KeyPressed' }}" | |
sequence: !input tap_bottom_big_actions | |
# IF tap top right | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 002' and trigger.event.data.value == 'KeyPressed' }}" | |
sequence: !input tap_top_right_actions | |
# IF tap bottom left | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 003' and trigger.event.data.value == 'KeyPressed' }}" | |
sequence: !input tap_top_left_actions | |
# IF tap bottom right | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 004' and trigger.event.data.value == 'KeyPressed' }}" | |
sequence: !input tap_middle_actions | |
# IF release top left | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 001' and trigger.event.data.value == 'KeyReleased' }}" | |
sequence: !input release_bottom_big_actions | |
# IF release top right | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 002' and trigger.event.data.value == 'KeyReleased' }}" | |
sequence: !input release_top_right_actions | |
# IF release bottom left | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 003' and trigger.event.data.value == 'KeyReleased' }}" | |
sequence: !input release_top_left_actions | |
# IF release bottom right | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 004' and trigger.event.data.value == 'KeyReleased' }}" | |
sequence: !input release_middle_actions | |
# IF hold top left | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 001' and trigger.event.data.value == 'KeyHeldDown' }}" | |
sequence: !input hold_bottom_big_actions | |
# IF hold top right | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 002' and trigger.event.data.value == 'KeyHeldDown' }}" | |
sequence: !input hold_top_right_actions | |
# IF hold bottom left | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 003' and trigger.event.data.value == 'KeyHeldDown' }}" | |
sequence: !input hold_top_left_actions | |
# IF hold bottom right | |
- conditions: | |
- condition: template | |
value_template: "{{ trigger.event.data.label == 'Scene 004' and trigger.event.data.value == 'KeyHeldDown' }}" | |
sequence: !input hold_middle_actions | |
# ELSE: unhandled scene label/value | |
default: | |
- service: system_log.write | |
data: | |
level: debug | |
logger: "{{ logger }}" | |
message: "Activated scene '{{ trigger.event.data.label }}' with value '{{ trigger.event.data.value }}' for node '{{ zwavejs_device }}' ({{ trigger.event.data.node_id }})" | |
# ELSE: unhandled zwavejs event | |
default: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment