I've created a virtual driver which I've found very useful to use with Homebridge Hubitat v2 to leverage HomeKit's native presence detection, powered by phone GPS location.
I know this can be achieved with the Hubitat app, but I had a lot of problems on my old phone with geolocation running down the battery. This method at least relies on something handled natively with a built-in app and seems to have a little less power impact. It also allows for family member presence detection without them having to install the Hubitat app.
- Virtual Switchable Presence - Import URL: RAW
Or search on Hubitat Package Manager for BirdsLikeWires and you should see my generic drivers repository.
Virtual Switchable Presence
This provides a weird device which will flip between "present" and "not present" when its virtual switch is turned on or off. It will report a timestamp of when it was last switched.
The way I have this set up is to add a virtual device to HE using this driver, then share it out to HomeKit via Homebridge using Homebridge Hubitat v2. Then set up two automations per switch; one to turn the switch on for arriving, the other to turn the switch off for leaving.
You can now use the status of the virtual switch or presence of the virtual device to trigger events using the far-more-reliable Hubitat automations. Sadly this does not improve the reliability of automations that HomeKit is handling (ie. flipping these switches) which for me has been one of the biggest problems of the Apple system.
Setup
I'd recommend using Capability Filtering in Homebridge Hubitat v2 to temporarily remove the switch function from the virtual device. This will cause HomeKit to create the device as a presence sensor. Then remove the switch filter and you will have a presence sensor which has a switch, rather than a switch with a presence sensor. This prevents the switches from being too easily flipped on and off manually in Apple's Home UI; it becomes a two-step process.
I also keep them in a room called "House" and not set as a favourite, so they won't appear on the initial Home page.