Anyone here know how I can get a physical address aside from the longitude and latitude shown by device tracker? I plan to hook it up to Alexa/Google Home, and make it respond to “Where’s my wife?”, and based on the GPS location it gets from device tracker, HA will reply “Your wife is on main street cor. maple street” or something like that.
AFAIK this is not possible using “only” HA at the moment. The keyword you are searching for is reverse geocoding and google has an API for that. So you could write something in python which gets called from HA every 5 minutes and when your wife is not home and geocode her location and write it to a sensor using the REST API.
I’m not very good with writing code myself, however I did notice that in the dependencies folder there is already a geocoding.py file within the googlemaps folder. So that might give an enterprising coder a good start for this I would hope.
I made a sensor that reports a readable address for Alexa. I use a find and replace later to change AVE to Avenue etc. Here is the bit of php code that translates to major intersections.
…and I’ve also made one that returns address, place name and place type as well as direction of travel and distance from home using OpenStreetMaps that does not require registering for an API key…
Can you update your integration to display the actual longitude and latitude values from the device tracker? Or better still, create/generate a sensor or an entity for longitude and another for latitude?
This would be very helpful for people (like me) who need the actual coordinates, not the address… It would make your integration more comprehensive…