I have built a component that uses OpenStreetMaps to provide reverse geocode lookups and gather some other data that I am finding pretty useful.
Apart from the usual reverse lookup ‘place’ information, the sensor will also calculate the users “distance from home” and their current “direction of travel” as either “towards home”, “away from home” or “stationary”. Each user being tracked can have their “home” set to be a different zone (which is necessary for a distributed family). The sensor also generates a URL for Apple Maps or Google Maps that can be attached to a notification and provide a clickable link to see where the user currently is. The component also doesn’t only rely on polling for it’s updates. It subscribes to DeviceTracker state change events and it generates it’s own update event with trigger data containing attributes essential to constructing a good notification.
It was my first python project and unfortunately it does not conform to the guidelines required to submit it for inclusion in the product - but it works well (for me) as a custom component, so I thought I’d share it here in case others also can find a use for it. I spent about 2.5 months developing, testing, tweaking and extending it - then I’ve spent the last 30+ days testing it without any tweaks, so I guess it’s as ready to share as it will ever be.
To use it, you provide a name and a device tracker entity. There are a bunch of other optional things you can provide to enable different behaviors. The documentation is built into the .py script and in the readme on GitHub.
Here’s the link for anyone that wants to try it out. Feedback is welcome.
The readme on Github also has examples of how to create automations that sends notifications for a single user and for all users.
I know that there are a couple of other similar sensors out there - but they didn’t do exactly what I needed when I needed it - so I decided to go the route of creating my own. Hope someone out there finds this one useful.
Anyhow - enjoy….