Google Geocode Custom Component - GPS to Street Address

Is it possible to use this component with a person entity

as far as I know not. Only device trackers. I’m thinking as well about a possibility, to show the formatted adress on a person entity instead of geo coordinates

It seems this pull request would implement it. However it hasn’t been merged yet. You can still edit the ‘sensor.py’ file.
https://github.com/michaelmcarthur/GoogleGeocode-HASS/pull/21

1 Like

I have just added the pull request. It now part of the main code.

2 Likes

It works indeed. I edited the sensor.py file.

Can someone please help me using this component with a variable in order to see last zones the device entered?

Do you think is possible?

Any sugestions on how to use the component in Lovelace?

Create a sensor:

  • platform: google_geocode
    name: Your_location
    origin: device_tracker.Youre_device
    options: formatted_address
    api_key: Your Key

This sensor can be displayed as entity in Lovelace

1 Like

activate the component https://github.com/rogro82/hass-variables
create the variable
variables:
Last_Zones:
value: “home”
restore: true
attributes:
zone_history: “Zone1, Zone2…”
last_zone_leaving: “Timestamp”

in an automation with event trigger, you can set the variable.

This is my sensor defined in sensors.yaml

- platform: google_geocode
  name: Pål
  origin: device_tracker.pals_iphone
  options: street, street_number, city
  display_zone: hide
  api_key: !secret google_geocode_api

And I see the sensor.pal listed as an entity, but I am not able to display it in Lovelace.
I would be more than happy if some one would print out the correct code for me :smile:

just set it up, looks great thanks :slight_smile:

Any way to get it to handle landmarks? such as major shopping centers or parks?

Landmarks is a separate google api and I never integrated it in to this component. It currently not possible which this. I did work on an openstreetmap version that works with place name. You can find it here. Its not correctly documented anymore but if you follow the same process as the installation of google geocode the edit the file name and the manifest file it still works.

1 Like

Hi Michael,

I have been using this component for a while. Works great. Thank you!

If possible, would be nice if it support/work with custom_updater. :slight_smile:

Thanks again.

custom_updater support would be amazing !

Thank you michaelmcarthur,

I was waiting for a fix for this since the 0.92 update. All I had to do was insert the manifest file into the google_geocode directory.

hi,
in old version of this componet i was able to change the lang to hebrew by
" got it to work in hebrew…
in the google_geocode.py file
you need to change:
url = “https://maps.googleapis.com/maps/api/geocode/json?latlng=” + lat + “&key=” + self._api_key

to

url = “https://maps.googleapis.com/maps/api/geocode/json?latlng=” + lat + “&key=” + self._api_key + “&language=iw&region=IL”

And you will get the address in Hebrew.
you can select whice language and region by changing the parmeters"

now i cant, can you help?

Anyone have an idea?

It’s strange it should still work. I had a look over Google’s api docs and the language and Hebrew code are still the same. Sorry I can’t be of help

In google it work.
But in the new sensor.py if I change the componot dosent load

i got it to work.
the same thing.