Hello - I have an Aqara FP2 integrated into HA via HomeKit. I would like to create some automations when 3 (or more) people are detected in a room… With the HomeKit integration, it seems like all I can do is create automations for Presence or Not… is there a way to get additional functionality with my FP2?
there is a workaround to this, but requires redesign of your zones in Aqara application and reinstalling the aqara sensor in HA.
In Aqara app you can define up to 30 zones, so you should split the room in up to 30 zones, (representing 1 zone for example with 1-4 squares). Name the zones, z1,z2 etc.
then when you install again the sensor in HA, you will get all these zones.
Then you just have to create a group of all these zones.
If more than 1 person in the room, and the persons are tracked in the detailed zones you have setup, the group sensor will be giving you the Total number of the people with good approximation.
good hint. Thanks. In my case I do not have to reinstall the sensor in HA after redefining zones in the Aqara app. The changed/new zone just pop up in HA HomeKit Device.
I’m not sure this is possible using standard HA automations. But it is quite easy with the Node Red add-on. You should be aware though that Node Red is a totally different approach to automation and has a learning curve.
If you want to count the zones on, then you should create a Helper => Group => binary_sensor, where you should add all the zones of your FP2 (exclude only Zone 1, since this is the overall Room presence and if selected will double count the presence).
Then create another Helper => Template which you need to point to count the previous Group of Sensors for those that are ON. This way you will have the number of Zones that are ON and with good approximation the number of people in the room…
Below an example code for the template sensor:
{{expand(‘binary_sensor.fp_master_bedroom_presence’) | selectattr(‘state’,‘eq’,‘on’) | list | count | int(0) }}
where binary_sensor.fp_master_bedroom_presence is the Group Sensor that contains the Zones.
From what I see - there’s “Limited free” option to see a count of people in the room.
I enabled it, but it doesn’t appear in HA (tried reloading the integration but no luck). Any ideas if it’s “exposed” ?