Supports multi-click behavior on the Heatit/Thermofloor ZDim rotary dimmer.
Only compatible with 2021.4.0 and newer.
When the dimmer knob is clicked from 2-5 times rapidly, different scenes are triggered. This blueprint makes it easy to perform actions on those events.
Just select the ZWaveJS dimmer device, and the rest is automatically handled.
This is the ZWaveJS version of my OZW-based blueprint located here: OZW - Heatit ZDim scene controller (knob multi-click)
blueprint:
name: ZWaveJS - Heatit ZDim scene controller
description: |
Perform actions when ZDim knob is multi-clicked.
The release actions you probably do not want to define, as it is
triggered after every multiple-click scene activation.
Remember that 6 clicks in rapid succession puts the device into Z-Wave
inclusion/exclusion mode, so quintuple clicks should probably be
avoided.
domain: automation
input:
zwavejs_device:
name: ZWaveJS Device
description: The Heatit ZDim dimmer to listen for events on.
selector:
device:
integration: zwave_js
manufacturer: Heatit
model: Z-Dim
entity:
domain: light
click2_actions:
name: Double Click Actions
description: The actions to perform when the scene is activated.
selector:
action:
default: []
click3_actions:
name: Triple Click Actions
description: The actions to perform when the scene is activated.
selector:
action:
default: []
click4_actions:
name: Quadruple Click Actions
description: The actions to perform when the scene is activated.
selector:
action:
default: []
click5_actions:
name: Quintuple Click Actions
description: The actions to perform when the scene is activated.
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
- 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 double clicked
- conditions:
- condition: template
value_template: "{{ trigger.event.data.label == 'Scene 001' and trigger.event.data.value == 'KeyPressed2x' }}"
sequence: !input click2_actions
# IF triple clicked
- conditions:
- condition: template
value_template: "{{ trigger.event.data.label == 'Scene 001' and trigger.event.data.value == 'KeyPressed3x' }}"
sequence: !input click3_actions
# IF quadruple clicked
- conditions:
- condition: template
value_template: "{{ trigger.event.data.label == 'Scene 001' and trigger.event.data.value == 'KeyPressed4x' }}"
sequence: !input click4_actions
# IF quintuple clicked
- conditions:
- condition: template
value_template: "{{ trigger.event.data.label == 'Scene 001' and trigger.event.data.value == 'KeyPressed5x' }}"
sequence: !input click5_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 ozw event
default: []