Detect only smart detection on Unifi cameras

Hi guys,

I’m between houses and I have nine UniFi cameras on the new house, controlled by a Cloud Key 2. Six of them can do smart detection of the human body. My Home Assistant installation is still at the old house. I know I can trigger based on motion, but is there a sensor just for smart detections and I can use that to trigger something when it detects a human?

I’m using this: UniFi Protect - Home Assistant

And it seems it should work. Anyone has that running?

Following this. I’ve explored this and can’t seem to get the smart detections to work in HA. They only seem alert of normal motion

I’ve managed to detect it. Here’s my automation, for example.

  • Any camera detects motion (any motion)
  • House is armed (boolean set by me) AND any camera have detected object = person
  • Notify our cellphones and UNLEASH HELL!
alias: Trigger do Alarme (movimento nas câmaras e casa armada)
description: ''
trigger:
  - type: motion
    platform: device
    device_id: 0d0f574201bb2090a896073a46766e88
    entity_id: binary_sensor.motion_rua_da_paz_dta
    domain: binary_sensor
  - type: motion
    platform: device
    device_id: e4a22ec087fb3490fbe69e737d6a791f
    entity_id: binary_sensor.motion_av_republica_esq
    domain: binary_sensor
  - type: motion
    platform: device
    device_id: d5f70af2ac8b8b26b90b4cd1afd278e8
    entity_id: binary_sensor.motion_piscina
    domain: binary_sensor
  - type: motion
    platform: device
    device_id: 0688945469601b0a59bce7b225cf9f08
    entity_id: binary_sensor.motion_garagem
    domain: binary_sensor
  - type: motion
    platform: device
    device_id: 00be73a85bdebf7695ddc6e59c169989
    entity_id: binary_sensor.motion_piso_1_tras
    domain: binary_sensor
  - type: motion
    platform: device
    device_id: 84259e73cbef1d18923e4b3165568cca
    entity_id: binary_sensor.camara_piso_1_frente_motion
    domain: binary_sensor
condition:
  - condition: state
    entity_id: input_boolean.away_from_home
    state: 'on'
  - condition: and
    conditions:
      - condition: or
        conditions:
          - condition: state
            entity_id: sensor.rua_da_paz_dta_detected_object
            state: person
          - condition: state
            entity_id: sensor.av_republica_esq_detected_object
            state: person
          - condition: state
            entity_id: sensor.piscina_detected_object
            state: person
          - condition: state
            entity_id: sensor.garagem_detected_object
            state: person
          - condition: state
            entity_id: sensor.piso_1_tras_detected_object
            state: person
          - condition: state
            entity_id: sensor.camara_piso_1_frente_detected_object
            state: person
action:
  - service: notify.todos_telemoveis
    data:
      message: Pessoa detectada com a casa armada
      title: ALARME ACTIVADO
  - service: automation.trigger
    data: {}
    target:
      entity_id: automation.ligar_luzes_quando_detectadas_pessoas
mode: single