Multiple Aqara cubes as trigger in one automation

Hi,
I have three Aqara cubes and want to have the same gestures binded to the same actions on all cubes. Therefore I want to use one automation for all three cubes. I can not find a syntax working with multiple entities as triggers.
This works:

- alias: cube_event_flip_180
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id: binary_sensor.cube_158d0002a6f758
      action_type: flip180
  action:
    - service: light.toggle
      entity_id: light.livingroomsubbulb

This does not work:

- alias: cube_event_flip_180
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id: binary_sensor.cube_158d0002a37196, binary_sensor.cube_158d0002a6f758, binary_sensor.cube_158d00010b265c
      action_type: flip180
  action:
    - service: light.toggle
      entity_id: light.livingroomsubbulb

This does also not work:

- alias: cube_event_flip_180
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id:
      - binary_sensor.cube_158d0002a37196
      - binary_sensor.cube_158d0002a6f758
      - binary_sensor.cube_158d00010b265c
      action_type: flip180
  action:
    - service: light.toggle
      entity_id: light.livingroomsubbulb

Does anyone know how to include all three cubes?

I have no experience with platform:event, but is the entity_id indentation correct?

1 Like

I am pretty sure it is. I tried others and it did not change. Also, this indentation works when used for the actions and e.g. multiple lights.

Just got help from a friend who created a similar example with the visual automation creator. This syntax works:

- alias: cube_event_flip_180
  trigger:
    - platform: event
      event_type: xiaomi_aqara.cube_action
      event_data:
        entity_id: binary_sensor.cube_158d0002a37196 #sleeping
        action_type: flip180
    - platform: event
      event_type: xiaomi_aqara.cube_action
      event_data:
        entity_id: binary_sensor.cube_158d0002a6f758 #living
        action_type: flip180
    - platform: event
      event_type: xiaomi_aqara.cube_action
      event_data:
        entity_id: binary_sensor.cube_158d00010b265c #hall
        action_type: flip180
  action:
    - service: light.toggle
      entity_id: light.livingroomsubbulb