HA not detecting location on first start

Hi all. Just finished installing yesterday and started up fine. Tonight I wanted to start fiddling with the configuration and noticed that my location information was not autodetected like the docs say should happen. All the location values just read zero.

Logs don’t show any errors, or anything for that matter, on trying to detect the installation’s location. The only location based issue I found in the log was related to getting the astral location for the sun, because hass.config.time_zone.zone is None.

Is there a known issue with the location detection and if so, what is the best service for me to use to find this out and enter the values manually?

What device trackers are you using?

No device trackers, I just wanted to have HA know where “Home” is. The docs say it tries to autodetect this, but my autogenerated config entries for this are all “empty” zero values, leading me to believe that the location detection failed.

I’ve always used google maps to get a lat/lng to set the home location up.

Same here. I use google maps to determine my home’s GPS coordinates. (Just click on a spot and it will give you latitude and longitude.) Then just enter them in configuration.yaml under homeassistant:. Also, under the same parameter, make sure to set time_zone: appropriately, and make sure it matches what is set in the OS HA is running on. If they don’t match you will eventually have problems.

Using GMaps seems to have done the trick. Thank you all for your help.

And if you want to be more secure if you ever need to post your config later and don’t want to have to remember to scrub your config files of any personally identifiable information you can, and is recommended to, use !secrets to hide that (and other) info.

Auto detection of your lattitude and longitude relies on ip geolocation. Mine ended up at my ISP’s headquarters about 500 miles away. Other times it won’t work at all. As others say, add it yourself :slight_smile:

Yes, I just bumped into the syntax for that in the docs earlier tonight. Definitely something to in there! :smile: