@brugk000 this should work.
{{ states.sensor.auto.attributes[“Formatted Address”] }}
@Jtmoore81 it’s not implemented yet. I’m testing it at the moment. It looks very promising.
@toddw65 places works but the closest it’s managed to find was 1 mile away from me. Most of the time it was around 3 miles away. I found with Google’s geolocation api it classes streets and towns differently in some countries. I think it might be the same for places. I’m going to investigate and see if I can get it to find closer locations.
@toddw65 I spent sometime testing out different location searches. I can’t get the accuracy as good as it needs to be in my area. I live in a suburb but have shops near me. I’m finding that I can get locations that are around one mile away. How close are your results?
Generally it seems to depend on where I am. I live in the boonies where the closest business is miles away, but when my wife or I are in town, I seem to generally get reports that are in hundreds of meters or less.
I was in the process of trying to switch from Owntracks to Tasker for reporting and seem to have something messed up at the moment. As soon as I get that corrected, I’ll take another look and do some location & distance logging.
I’ve been using my own version of a Reverse Geocode sensor for a few months now based on OpenStreetMap data and I’m finally ready to share it with anyone who might find it useful.
Apart from returning the “Place Name”, “Place Type”, “Address”, “Neighborhood”, etc. It calculates a user distance from home and whether they are traveling “towards home”, “away from home” or “stationary”. Multiple users can have unique home zones defined for them. It also generates a link for Google Maps or Apple Maps that can be sent with a notification and clicked to open the users location on a map.
The custom component itself - and more details about it - is available here to anyone that cares to try it. It’s been stable and working well for my family for over a month now.
[https://github.com/tenly2000/HomeAssistant-Places]
Hi Michael
Thanks again for this grate component i use it with my google API and zanzito it works without fail.
Just wanted to ask you a question about the changes on google maps, will this affect how the api works.
They are changing the way the API works from Jun 11 they will require to have an account and billing activated for the api to work. They do include (a free) $200 per month as credit, i assume that will be more then enough for a normal usage.
I just receive this email today, just wondering if you got one to, or not.
I got the same email. I am planning to post an update on this issue once I have looked into it. I run two device trackers and google said that I would be covered by the free $200 limit.
The component will be updated over the next month to reflect the changes that google are making.
I don’t know what the limits are. But with the OpenStreetMap api, it’s not a true api key that is required - it’s just an email address. I am tracking 3 users 24/hours per day and I’m supplying a different email address for each user.
My component also caches the last lat/long from DeviceTracker so it can check distance travelled since last update. It ignores distance changes < 10m and only makes the call to OpenStreetMap when required. This should reduce the number of calls to the API - although, on weekends, when everybody is moving around a lot - I do get quite a few notifications.
I use the map_link in notifications that I send so that I have a quick link to click on to look at where the person is and what else is in that area. For a while, I used a google link that automatically calculated directions for the user to get home from - or for me to get to them - but that got annoying more often than not, so I reverted back to just a map centered on the users current location. Map_zoom is a configurable option you can use in conjunction with map_link if you want to see more or less of the users surroundings.
Thanks, that makes sense with sending a link to the map in a message.
I only discovered both of these components today. I tried the google one and for some reason sometimes it worked and sometimes it didn’t because it said I had exceeded the usage allowance. But it was inconsistent, not always one or the other.
I assume you mean the zoom is configurable in that you can alter what is sent in the link? There is no way to show the map in HA. Right?
The Home Assistant iOS app is already capable of displaying a map in a notification if you pass the latitude and longitude to it (see the iOS notification documentation for details). I started off using that in my notifications, but it was static and I couldn’t control the zoom level on it. It would have been ideal if it was a clickable link that would open the same location in the Maps app - but the developer of the iOS Home Assistant app did not respond to any of my questions - so I went this route instead.
In my situation the 200$ should not be sufficient google told me
So Is there a way to manually update the traveltime sensor so the api requests decreases?
And does anyone know if you can set a limit so you dont get a high bill if you accidentally exceeds the 200$ limit?
I had a look into the changes Google are making. Most users should not be charged anything for using my component. You can review the pricing structure here. For geolocation the free allowance is 40000 calls a month. That works out as 1290 calls a day. Over the last 30 days one of my trackers only updated 380 times. Google is now calling their API ‘Google Maps Platform’ which includes Maps, Route and Places. A user could exceed the free allowance if they are using the api key for other maps services.
I have added step by step instructions on how set up billing to the readme on Github. Here are the steps