YAML Sanity Check with automation

Hi,
I’m new to YAML and I’m trying to create an automation that IF the front door detects motion AND either the Side Gate or Garage Cam detect movement, THEN turn on the sirens.

I.e if movement detected at the front and someone gets through the gate and movement is set off, then trigger the alarm. I’ll then set a time for it during sunset to sunrise.

Could you please tell me whether I have my logic laid out correctly for the above scenario?

Many thanks,

alias: Front + Side Motion Siren
description: ""
trigger:
  - type: motion
    platform: device
    device_id: c8c0bd38a5cbd57a7e9e1875715bc999
    entity_id: binary_sensor.front_door_motion
    domain: binary_sensor
condition:
  - condition: or
    conditions:
      - type: is_motion
        condition: device
        device_id: c8c0bd38a5cbd57a7e9e1875715bc999
        entity_id: binary_sensor.front_door_motion
        domain: binary_sensor
      - type: is_motion
        condition: device
        device_id: 9f936b3ac0971b2f0c41a8696f146999
        entity_id: binary_sensor.garden_motion
        domain: binary_sensor
  - condition: or
    conditions:
      - type: is_motion
        condition: device
        device_id: c8c0bd38a5cbd57a7e9e1875715bc999
        entity_id: binary_sensor.front_door_motion
        domain: binary_sensor
      - type: is_motion
        condition: device
        device_id: 21a06aaf3c1045152979386568f81999
        entity_id: binary_sensor.side_gate_motion
        domain: binary_sensor
action:
  - type: turn_on
    device_id: 21a06aaf3c1045152979386568f81999
    entity_id: switch.side_gate_siren
    domain: switch
  - type: turn_on
    device_id: e1b24cf5fa25ce2011e751fee66ed999
    entity_id: switch.garage_cam_siren
    domain: switch
  - type: turn_on
    device_id: 9f936b3ac0971b2f0c41a8696f146999
    entity_id: switch.garden_siren
    domain: switch
mode: single

I’m not sure your automation is doing what you intend.

I believe that when binary_sensor.front_door_motion triggers the automation the actions will always be performed. This is because, each condition will always be true which is the case because, each condition is an OR with binary_sensor.front_door_motion as one of the things being ORed. Since binary_sensor.front_door_motion is true (otherwise the automation wouldn’t trigger) then both conditions will always be true.