Hi everyone, I’m struggling to get basic zone detection working properly in order to trigger autiomations. Any suggestions gratefully received!
My setup: I have a basic Home zone. I also have presence detection for my phone/tablet/watch using ESP32Cs and the ESPresense integration. These work fairly well with a few problems, and I have a number of automations using these as triggers.
One thing I can’t seem to get right is to detect when I’m in the back garden (which would trigger some other automations e.g. notifying me if there’s someone at the door as I wouldn’t hear it). I usually stay connected to the home wifi while in the garden, but not always.
A few options I’ve considered:
- First off, it’s not practical to have an ESPresense node in the garden as I don’t have mains power
- I tried detecting a move to the garden triggered by Room Presence changing from Kitchen to Unknown while still connected to wifi, but couldn’t get this to work reliably
- My current attempt is to set up a second zone called Back Garden. However, it seems to aggressively place me in Back Garden, even when I am home. More on this below.
This is how my zones are set up. The red circle is where I actually am. The green shape is the rough boundary of my garden. The orange circle is the “Back Garden” zone which I’ve moved ~100m away from the actual back garden for testing. However it still often chooses “Back Garden” as location, even when I am home. [Typically, while I was typing this it has refused to flag me as in Back Garden, so I have moved it closer to the house now for testing purposes]
This is what I see in the entity state
It has detected me as being in both Garden and Home zones, but has prioritized me as in Garden. (A few minutes later and I’m back in the Home zone). If I look at a dashboard with my location history shown, it seems to jump around a bit in the area, but never putting me actually in the garden zone
I’m unsure where to go from here… is there some way to tell Home Assistant “if GPS accuracy is low, and you think I’m in both Garden and Home, always choose Home as the state”? Do I need to change my Location settings in the Companion app? Am I doing this completely wrong?
Also, on a secondary note, I see frequent drop-outs where device trackers intermittently changes to “Away”. This seems to happen most for my wife’s phone, which is an older model, but I also see it on my son’s phone (which quite often seems to disconnect for a lengthy period). If anyone has any pointers on how to diagnose, that would be helpful. It’s a minor annoyance but if all devices drop at the same time my “House Occupied” template sensor incorrectly says the house is unoccupied.
And just to reference, I have looked at this article on optimising mobile location and minimum accuracy and the HA documentation but didn’t find anything that helped me.
My companion settings for my phone are
- Background Location: Enabled. High-accuracy mode: enabled, High Accuracy only when entering Zones: Home, Garden
- Location zone: Enabled, minimum accuracy 200
- Single accurate location: enabled



