How to detect long press events on zwave switch or dimmer?

Before using the openzwaai add-on in home assistant, I was able to detect a long-press or double-press event on one of my fibaro wall dimmers. I used it as a trigger for automations of course.

Now, with the openzwave panel, I no longer have a zwave.xxxx device, which I used to detect those events.

Is there a way to detect those events now? I have tried monitoring the events in the log, but there is just way too much flying by to catch anything. Also, hooking up a debug node to the state-changed node for the dimmer did not help as I don’t know what to look for.

Does anybody have a tip?

Hey, did you ever get an answer/solution to your question I am searching for the same thing.

If you’re using the current ZwaveJS then this works fine. However, you may need to enable this in the configuration for the device. Here is what I use to detect a “hold” on the switch in my entrance:

- alias: Turn off All Lights on Entrance Hold
  id: entrance_switch_all_off_on_hold
  mode: restart
    - platform: event
      event_type: zwave_js_value_notification
        node_id: 28 # switch.entrance_ceiling_switch
        value: 22 # hold

Here is what I use for double-click in the bathroom:

# Toggle lights with no timer on double-click
- alias: Downstairs Bathroom Double Click On
  id: downstairs_bathroom_double_click_on
  mode: single
    - platform: event
      event_type: zwave_js_value_notification
        node_id: 47 # light.downstairs_bathroom_switch
        value: 14 # double-click

You can find the node_id from the zwave device (Integrations->Zwave->Device Info->“ID”) and the value from either monitoring events in the developer tools or from the manual. You will probably need to enable sending scenes on the device, though!


1 Like