could you put groups into the sensor component? I put my device trackers in a group and when it updates, the group state updates to the current location. Will it take the group as an origin like this?
- platform: openstreetmap_geocode
name: Stac using Group
# api_key: !secret GOOGLE_API_STAC_ACCT
origin: group.stac
display_zone: show
options: place
My component is a sensor which home assistant does not handle group state changes as it does a group of device trackers. It’s an issue how home assistant deals with groups.
It’s the first time I have seen that error. Thanks for pointing it out. Have a look at what services your Api key is authorised to use. This can be done in the google developer website. Make sure Geocoding API is turned on.
Thanks you so much for this component and the time you and other here put in it.
I have 2 device trackers that i added but for some reason only one shows the address for some reason.
I thought that one is not working always staying on awaiting update but after a restart i so that now that states reversed second one is displaying awaiting update an first one works fine.
I tried with one api and another without and i reversed and remained the same one will work another not.
It might be something to do with the device tracker. Can you check that the tracker has a lattitude and longitude value? This can be done by checking developer tools > states > click on device tracker.
Hi Michael
Great work on developing this component. Hope it gets integrated into HA. Can one api key be used to track more than one device. If yes, would like an example on how to setup. What I setup is not working for all devices, works for one device.
Here is what is I did for one device and then copied for other device with their device tracker names. Device 1 updates with slight error showing my device is about 3-4 houses down the road. It is probably on how GPS is reading it, not a big deal. Other device just sits with “Awaiting Update”. My other nmap tracker, owntracks etc show all the devices with appropriate coordinates.
Device 1:
platform: google_geocode
name: Device 1
origin: device_tracker.device1
options: street_number, street, city, state
display_zone: hide
api_key: xxxxxxxxxx
platform: google_geocode
name: Device 2
origin: device_tracker.device2
options: street_number, street, city, state
display_zone: hide
api_key: xxxxxxxxxx
What you are doing is correct. You can have two ore more sensors. You mentioned nmap device trackers. Nmap won’t work as it’s a router based tracker. What type of device tracker is the one that does not work?
I am using these trackers - Owntracks, nmap, homeassistant location updates to update the location. Dont know if anything else is available that is more reliable.
I just found this and so far it’s been great! Only took a few minutes to add and get up and running, I am still testing but this it’s working great!
edit: one thing I’ve noticed is if you have to restart your HASS sometimes I get an error message that shows you’ve reached the free api limit but after a few restarts this error message goes away and works as it should.
I configured all following the guide on github, but after restarting HASS all my sensors disappeared from the frontend and also from the device tab…
I was forced to delete the platform adn restart HASS to have again all the sensors.
What happened?
It will be something to do with the format of the sensor.yaml. Double check how you have added the component to your yaml. Have a look at your error log it will give you a clue how to find the issue.
Everything looks good. Stick with the google_geocode as the openstreetmap has not been fully tested. What kind of device tracker are you using? Also check if the device tracker has updated with new lat lon coordinates as if it has not updated Geocode won’t update.
I am using right now openstreetmap as config says my api key is invalid and really don’t know how to get one working. As device tracker i am using nmap. Still not having the sensors working…
And this is the screenshot of the sensors (i am using both the geocode ways)
nmap is a static device tracker it only shows when someone is in one location. You need to use owntracks or similar that updates location from a mobile device.