Automation not triggered for motion detection by one of two Zigbee motion sensors

Hope someone can help me, struggling with this for some time now.

I have 2 Zigbee motion sensors (Aqara and Ikea). I have 2 automations, each of them activating lights in the room where the motion sensor is located. Works perfectly.

Now trying to send an alert when I’m away (having an input_select variable with a specific value) when one of those motion sensors is triggered.
Having only one of the sensors in the trigger works fine. Putting both of them in an or condition does not trigger anything.
Upgraded to 2021.4.6 : in the trace no trigger activation is seen. The lights turn on however, so motion is detected and handled by the other automation.

(Working) Automation to turn lights on (for one sensor):

id: '1587231385775'
alias: MotionGarage
description: ''
trigger:
  - entity_id: binary_sensor.0x00158d000464108b_occupancy
    from: 'off'
    platform: state
    to: 'on'
condition: []
action:
  - data: {}
    entity_id: switch.sw_tas_2
    service: switch.turn_on
  - data: {}
    entity_id: switch.sw_tas_3
    service: switch.turn_on

(non-working) Automation for alarm:

id: '1612474631160'
alias: Alarm
description: 'Stuur alarm '
trigger:
  - platform: state
    entity_id: binary_sensor.0x00158d000464108b_occupancy
    from: 'off'
    to: 'on'
  - platform: state
    entity_id: binary_sensor.0x90fd9ffffe35cd33_occupancy
    from: 'off'
    to: 'on'
condition:
  - condition: state
    entity_id: input_select.alarm_state
    state: Aan
  - condition: or
    conditions:
      - condition: state
        entity_id: input_select.alarm_state
        state: Auto_Aan
action:
  - service: notify.mobile_app_iphone_marco
    data:
      message: 'Beweging gedetecteerd om {{ now().strftime("%H:%M:%S") }}'
mode: single

I used the automation tool to create the automations.

Help is appreciated,
Marco

You put the ‘or’ in the wrong place:

condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: input_select.alarm_state
        state: Aan
      - condition: state
        entity_id: input_select.alarm_state
        state: Auto_Aan

the first one “input_select.alarm_state == Aan AND input_select.alarm_state == Auto_Aan OR”.

When you read it out it should be more easily seen why that won’t work.

Thanks finity,

see your point, build it using the frontend. See now where to create the OR there.

But the fact was that I didn’t see that the trigger’s where activated. Strangely as of a few hours ago it seems they are triggered, I now see the events in the trace. And that was before I corrected the OR.

I will do some more testing.

Thanks,
Marco