I have a HomeKit enabled home lighting system. I have setup an automation where the G4 person detection should trigger the chosen lighting circuit to activate between the hours of sun down and sun up. When I ‘run action’, the lights come on, but once the automation is turned on, the person detection doesn’t seem to be registered by HA. Person detection is however registered on the Unifi Protect App. Non-Smart Motion detection seems to work fine, but is too sensitve and just keeps coming on due to cars passing my frotn door. Anyone have any ideas to steer me in the right direction to get this working please?
So if I understand it correctly.
When you run the shown automation by triggering it manually, it runs as expected. But it doesn’t trigger when the state of switch.g4_doorbell_detections_person changes to on.
Can you see the actual status of the switch in HA (for ex. using ‘Developer Tools → States’)?
If so, do you see it change there when you toggle the state of the switch?
If not, then it makes sense that there is nothing triggered. Perhaps someone with HomeKit knowledge can help you further.
If you do see the change, you might want to test using a State trigger instead. Use the to field to enter the state exactly as it is shown in the ‘Developer Tools → States’.
Yep - That’s right. Doorbell person detection should trigger a light to come on once person detection trigger is activated. All works fine when manually hitting run, but doesn’t work as expected in actual usage.
Thanks for this suggestion. I never knew about it. Weird as looks like the Doorbell Detection Person Entity is showing as perpetually on. Except when I changed it’s current state to off using the States tab in developer tools.
Could that be why it never acts as a trigger - its not changing states.
It seems like the status is never updated/changed. If the status never changes, an automation will never be triggered. Cause it needs a status change that matches the trigger condition to trigger.
So the question is, why… I am not familiar with the sensor and UniFi protect integration, so I am not sure…
Could it be that the “person detect” isn’t “recognizing” a human being and therefor not triggers?
I do see the motion detect change. Maybe you could do a test run using that and meanwhile figure out what the person detector needs to detect persons
I can imagine that it’s just a small config thing in UniFi. It’s clear that the other sensors do update, so in general the integration works.
This baffled me for a while too, but it is as suggested it is an issue to do with “state” being required for the trigger not device
So set it as state and while you can avoid “from” the field for “to” needs to read “person” and if you wanted to do one for vehicle then it needs to read to “vehicle”
You don’t want to use the switch.g4_doorbell_detections_person entity. You want to use entity that is referenced by the doorbell detected object Changing states from none to person works for me.
My experience is that all the Unifi motion sensors tried to date are slow (aka >1 sec detection). Therefore if your trigger is slow, the entire automation will be behind realtime.
One more potentially silly question, but where can I find a list of all the available states for each entity? I would never have known about the ‘person’ to ‘none’ and figured it might be ‘on’ to ‘off’
RichieDon, I am having the same issue - automation runs when triggered in HA but does not fire when I try it. I’ve tried the sensor…detected object and tried Off - On, “none” to “person”, “None” to “Person” and nothing.