Cannot Get UniFi Motion Detected Lighting Automation to Work

I have a HomeKit enabled home lighting system. I have setup an automation where the G3 motion detection should trigger the chosen lighting circuit to activate. When I ‘run action’, the lights come on, but in normal use the camera detection doesn’t seem to be registered by HA. Anyone have any ideas to steer me in the right direction to get this working please?

id: '1654797252799'
alias: TEST
description: ''
trigger:
  - type: motion
    platform: device
    device_id: c196e8091eb1d2d24ce20b24428f368e
    entity_id: binary_sensor.mabels_bedroom_motion
    domain: binary_sensor
condition: []
action:
  - type: turn_on
    device_id: 256fe59eae2bc0e1e9b95835bc06b78c
    entity_id: light.bedroom_main
    domain: light
    brightness_pct: 50
mode: single

On further examination, it seems the UniFi G3 instants or doorbells are not registering motion in home assistant. The UniFi Protect app is and provides notifications of motion detected, but this isn’t making its way back to Home Assistant.

Have managed to figure it out. Cameras needed assigning to the HA account in UniFi OS. Will continue testing.