Handling GPS vs. Wi-Fi states separately for an apartment above a shopping mall (No Companion App)

Hello everyone,

I'm looking for some advice on how to optimize my presence detection for a specific living situation by separating GPS and Wi-Fi tracking.

My Setup: Right now, I am using HomeKit automations for basic presence tracking. When an iPhone arrives or leaves, HomeKit toggles an input_boolean switch for that person in Home Assistant. This part works perfectly. I am not using the official Home Assistant Companion App, and I do not want to install it (especially on my girlfriend’s phone) to keep things simple and native.

The Problem / My Living Situation: My apartment is located directly above a shopping mall. Because of this, my physical location remains inside the standard GPS Geofence even when I leave my apartment to spend time downstairs in the mall. If I go down to the mall, GPS still thinks I am "Home", but I am obviously not in my flat.

My Idea: Two Separate Entities Per Person To solve this, I am planning to track two distinct states per person instead of forcing everything into one single "person" entity:

  1. input_boolean.person_gps_home (via HomeKit geofence)
  2. binary_sensor.person_wifi_home (via local Ping/ICMP, with a 15-minute delay_off to bypass the iPhone's aggressive Wi-Fi deep sleep behavior).

How I want to use this logic:

  • Arriving Flat: As soon as the local Wi-Fi reconnects (on), I am back in the flat. (e.g., turning on welcome lights).
  • Leaving Flat (but staying in the mall): My iPhone drops off the Wi-Fi. After 15 minutes of Wi-Fi absence, HA should know I left the flat, even though the GPS Geofence still says I'm "Home". (e.g., ideal time to run the vacuum robot).
  • Leaving Area completely: Both Wi-Fi and GPS change to away. (e.g., turning down the heating).

My Questions to the Community:

  1. Does it make sense to keep these two entities separate for automations, or is anyone successfully merging a Wi-Fi state (with a 15-min delay) and a snappy GPS state into a single, reliable template binary sensor/person entity?
  2. If you keep them separate, what is your preferred way to structure the conditions in your automations (e.g., using Template Sensors, complex AND/OR blocks, or specific helper combinations)?
  3. For those without the Companion App: Is a 15-minute consideration time (delay_off) for local Ping tracking enough to counter the iPhone’s Wi-Fi sleep cycles, or would you recommend a different threshold?

Looking forward to your ideas and how you solved similar "mall/apartment" tracking challenges!

Thanks!

i use a combo of homekit presence and private BT. One or the other may miss occasionally, but I’ve never had both of them miss as at the same time and they are both snappy.

1 Like

Are your GPS and BLE co-ordinates reported in two or three dimensions.

Your geofence may have to be a geocage and your code may have to be expanded to allow for threshold detection in the third dimension.