Multiple Z-Wave keypress types in a single trigger not working

Hi all,
I have several Z-Wave switches configured to activate a scene, when the switches are pressed. I’d like to handle multiple keypress types in a single automation, but this does not seem to work:

automation:
  trigger:
    - platform: event
      event_type: zwave_js_value_notification
      event_data:
        node_id: 33
        label: Scene 001
        value:
          - KeyHeldDown 
          - KeyPressed2x

Instead I need to define a separate trigger for KeyHeldDown and another one for KeyPressed2x.

Nevertheless, this same principle works for event_type, user_id, entity_id, … as the automation event trigger documentation shows.

Is there a possibility that I can use this kind of notation for a Z-Wave event trigger?
Thank you

No. You can remove the value field and replicate the logic in a conditional instead. Something like:

automation:
  trigger:
    - platform: event
      event_type: zwave_js_value_notification
      event_data:
        node_id: 33
        label: Scene 001
  condition: "{{ trigger.event.data.value in ['KeyHeldDown', 'KeyPressed2x'] }}"
2 Likes

That’s exactly what I needed. I also like the lookup in a list notation. I didn’t know that was possible in Jinja. So, I learnt more than I asked for. Thank you so much.