Cannot get Person Detection to work with Home Assistant for a AQARA FP300 sensor using ZigbeeMQTT integration integrate the devvice

Here is a sample of one of the automations that does not work.

alias: Bedroom 1 AC Off - Person Not Detected
description: >-
Automatically turn off the Bedroom 1 AC if no motion is detected for 10
minutes.
triggers:

  • trigger: occupancy.cleared
    target:
    entity_id: binary_sensor.aqara_bedroom_1_presence
    options:
    behavior: each
    for:
    hours: 0
    minutes: 10
    seconds: 0
    conditions:
  • condition: state
    entity_id: climate.bedroom_1_downstairs_crarytsaaae_climate
    state: cool
    actions:
  • action: switch.turn_off
    metadata: {}
    target:
    entity_id: switch.bedroom_1_downstairs_crarytsaaae_power_switch
    data: {}
    mode: single

Please format your code correctly using the </> button, we will then be able to read it, also tell us what the traces say when the automation is triggered.

With MQTT it can often be helpful to install MQTT explorer and connect to the MQTT broker to see what is happening on the MQTT side of things.

Despite the lack of proper formatting, I don't see anything immediately wrong with your automation.

There's 2 things you need to check apart from what was already suggested above:

  • Click on binary_sensor.aqara_bedroom_1_presence to see its history. It needs to have 10 minutes of no presence detected for your automation to trigger.
  • Check what value you set for Absence Delay Timer in Z2M. If it's set to 5 minutes (300s), then your sensor won't report as unoccupied until those 5 minutes have passed. That's when the 10 minutes timer for your automation trigger starts counting down.