Trigger for multiple instances on event data - Shelly

This does not trigger.
I want the same action to take place when a button is pressed on either of two Shelly devices. This seems like to most elegate way to do it, any advice please?

  triggers:
    - trigger: event
      event_type: shelly.click
      event_data:
        device_id:
          - xxxxxxxxxxxx #Garage rear Shelly button
          - yyyyyyyyyyyy #Garage front Shelly button
        click_type: single_push

Does your shelly device create event entities?

like event.something listed in settings → tools → states

If so you should use those and avoid using device ids.

Thanks for the link, and this is all true.
However, there are significant and strange issues in this particular case with using that method.
I tried using the event entity and it worked fine, until it didn’t…

I’m using this automation to react when a button on a Shelly i4 G3 is pressed. It seems this device (at least at FW2.0.0) has a tricky issue when rebooted or power cycled or comes back from unavailable. It throws a false press on the button (input 0 in my case). I tested this many, many times using the event entity. These false presses are triggered when the device cycles and was opening my garage door at random times, a big, frustrating security issue! When rebooting etc it does not fire a shelly.click event (visible from Dev Tools, Events). This is very strange as I thought these occurrences would be related. I have gone back to using the original code (as below) and no more false triggers. Go figure!!

    - trigger: event
      event_type: shelly.click
      event_data:
        device_id: xxxxxxxxxxxx 
        click_type: single_push

See here: Button randomly triggers action event since new update - #3 by 123

The automation example 123 links to is not Zigbee2mqtt specific. You can use it too.