I wrote this tutorial on how I implemented presence detection using the native iOS shortcuts app. It is working pretty good for me for years:
The reason the presence detection of the Homey App is not that accurate is because no app on both android or iOS has as much control over location services as the native automation libraries. The OS restricts the access to the locations services through the api layer. This is to prevent apps from draining the battery by unnecessarily requesting locations while the app is not running. Basically, an app can be in a number of different states, and the accuracy of the location and the frequency at which the app receives location updates changes based on the status of the app. An app can be fully closed and not running in the background, An app can be running in the foreground, an app can be running in the background whilst completing a task, an app can be running in the background whilst being idle. An app can subscribe to location changes, but it cannot know when the location change is triggered and to how many meters that location change is accurate. This makes it really hard for a third party app to make an algorithm that works consistently in all situations. The OS could decide to send the updated location when it’s just outside of the range at which the app’s algorithm defines it’s home, and then then only send another update half an hour later, or not at all. As a developer, the only thing you could do is widen or narrow the range, but is just a balancing act, and there’s no one size fits all solution.
In iOS, only the shortcuts app has more rights and is triggered more often with a more accurate location. You can simply make an automation that runs when you arrive at a certain location, or when you leave a certain location and it always runs very fast and accurately within a few meters. There’s no dependency on the state of the Shortcuts app. Automations always runs with the same accuracy no matter if the Shortcuts app is running or not.