ZWaveJS - Heatit ZDim scene controller (knob multi-click)

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: []
1 Like

Hello, i am just coming from a 7year openhab user (today)

Where do i put this to get scenes to work with the rotary dimmer?

No matching devices found

Are you sure you have the right model and you’re running the right ZWave integration? You can use the event listener in the development tools to see if events are triggered when you multi-click the knob. That’s at least a start to understanding if it can work or not.



It seems ok in the logs and dimmer type.

Okay, that last debug message there is from the zwavejs server running in the addon. If you check in the “events” section of the developer tools section in home assistant, do you also get the event there? You need to listen for the ZWaveJS events (or all) and carefully check if the dimmer emits events when you multiclick the knob (a single click is a toggle event, which is not related to the scene controll, AFAIK). If you don’t get events in the developer tools, then that is the issue. It might also be a possibility that you have a different/newer version of the dimmer than I have, but to my knowledge, they haven’t come out with a new version.

+1, same here.

I’ve confirmed via event listener that the event fires:

event_type: zwave_js_value_notification
data:
  domain: zwave_js
  node_id: 33
  home_id: 4121537294
  endpoint: 0
  device_id: a5f4182b3ba0311cd1e0a6dba0841e81
  command_class: 91
  command_class_name: Central Scene
  label: Scene 001
  property: scene
  property_name: scene
  property_key: "001"
  property_key_name: "001"
  value: KeyPressed2x
  value_raw: 3
origin: LOCAL
time_fired: "2022-10-12T12:03:47.958737+00:00"
context:
  id: 01GF618N3PS42YDDFSSVK08XGC
  parent_id: null
  user_id: null

The only thing I can imagine that is wrong, based on your event data, is that the selector doesn’t match the device manufaturer and model:

    zwavejs_device:
      name: ZWaveJS Device
      description: The Heatit ZDim dimmer to listen for events on.
      selector:
        device:
          integration: zwave_js
          manufacturer: ThermoFloor
          model: HeatIt ZDim
          entity:
            domain: light

If that is the case, then you need to modify the blueprint to match the correct manufacturer and model.

If this is still a problem for anyone. I got it working by change the blueprint to find my device. Changed the manufacturer and model. Voila :slight_smile: :

The blueprint now find my dimmer. Have not tested click, but I hope this works

manufacturer: Heatit
model: Z-Dim

Thanks for the update, @iot-janareo! I’ve modified the top post with the new manufacturer and model. It seems like Z-WaveJS changed the identifiers at some point and I didn’t notice. Hopefully this should help people just getting started.