HA 2022.6.7 cannot set or edit the Home location

I’m a HAOS newbie and I’ve just installed HA 2022.6.7 on an intel thin client. When doing the initial on boarding I was not shown or asked to set my home location. When I go into Settings/system/general there is no map showing and pressing edit takes me to the zones map which shows home as Amsterdam which is greyed out. Hitting the edit icon here just takes me back to the general tab. Did I do something wrong in my install?

I think that was changed in a previous version. Try creating them in Settings - Areas and Zones - Zones. You can also create them using configuration.yaml or customize.yaml:

zone.home:
  latitude: 40.7297
  longitude: -73.8182
  radius: 200
  elevation: 1140
  unit_system: imperial
  currency: USD
  time_zone: "America/New_York"

This reply is dramatically incomplete. The Settings | Areas & Zones doesn’t seem to let you actually set your location. When I click on Edit (beside Edit location), it takes me to a map that is centred on a location in Amsterdam. I can move the location to my actual house in North America but at that point I can’t actually do anything. The only thing that seems to work is the Add Zone button but it doesn’t use the area the map is centred on.

Unlike the OP, I did set my home location during the initial setup (when I first logged in) but it doesn’t actually seem to have done anything. The setting for my time zone and local currency are there but there is nothing to identify my location - except when I go to edit it, it seems to be Amsterdam.

I’m assuming that there is something that is supposed to work here but if there is, it is far from obvious. For example, it I click on the edit icon beside my location, it takes me back to the map centred on Amsterdam.

As for editing the .yaml files, the web interface doesn’t offer a way to do that. Nor does there seem to be a way to drop down the command prompt in the VM running Home Assistant to locate and edit the files.

1 Like

5 months later… :sleeping:

Things to try:

Install the “File Editor” Add-On so you can edit the configuration.yaml file.
https://github.com/home-assistant/addons/tree/master/configurator

Or you can install the “Samba Share” Add-On to expose the config folder to your network where you can edit the files.
https://github.com/home-assistant/addons/tree/master/samba

https://www.home-assistant.io/integrations/zone/

Apologies for being dramatically incomplete.

Thanks. Of course, it would be simpler if the Settings just let you set your location…

I’m not afraid of YAML but it does seem like a bizarre reason to have to resort to editing a configuration file. Every installation (I’d think) should have a location…

1 Like

OK, I got the file editor working and added the Latitude and Longitude coordinates for my house. However rather than showing my location, I am now getting a location in Kazakhstan!

Here are my settings:

homeassistant:
  name: MyHome
  latitude: 43.<about 12-14 more digits>
  longitude: 79.<about 12-14 more digits>
  elevation: 200
  unit_system: metric
  currency: CAD
  time_zone: "America/Toronto"

which I copied from home-assistant.io and replaced the values with the correct ones for my location.

This is what I’m currently using.

  1. Make a reference to an included file named customize.yaml in your configuration.yaml.
  2. Create a new file named customize.yaml and place the zone information there.
  • I found that anything beyond 4 or 5 decimal places seemed to have no effect on the location or accuracy.
  • Your current coordinates do place you in Kazakhstan!
  • Code added to an include! file has different indentation than if it’s in the calling file.

Try this:
In configuration.yaml:

homeassistant:
  customize: !include customize.yaml

In customize.yaml - replace the xxxx with your own:

zone.home:
  latitude: 43.xxxx
  longitude: -79.xxxx
  radius: 100
  elevation: 200
  unit_system: metric
  currency: CAD
  time_zone: "America/Toronto"

Thanks for the debugging and advice!

Once I got the second “home” added, I was able to delete the one in Amsterdam.

I’m still having a problem. Even though I’ve only got one zone defined, I’m getting sunrise and sunset events triggered by Amsterdam time rather Toronto time. Any advice?

Do the Time Zone and Country look correct in Settings - General?

There’s no problem with my time zone. I have an automation turning lights off at 9:30 PM that works perfectly. I have another one that turns things on and off to take advantage of off-peak electricity rates that also works.

It’s just the sunrise and sunset events that are based on Amsterdam time. This suggests that the events are calculated from my home’s location but that location is set to Amsterdam.

Some more things to look at…

  • Check under your Username - Profile and confirm that you have “Advanced Mode” enabled. I have no idea if this makes any difference, but I did find a reference that enabling it allows some items in the GUI to become available that are otherwise disabled.
  • Take a look in the file \config.storage\core.config I believe that’s where the initial home zone coordinates are stored. You can get to that folder with either the Samba Share or SSH & Web Terminal Add-On.
  • Check what the Sun integration shows for your sunrise and sunset times. Developer Tools - States - sun.sun
  • Does the Map show your correct location?
  • Do you still have the default.config entry in your configuration.yaml?
default_config:

Thanks. I’d already found the issue in core.config. It still recorded my location as Amsterdam.

The deeper problem is with how Home Assistant stores configuration. It seems to be a real mess. Not only does it use two different markup languages but it also doesn’t have a single unique place to keep configuration data. This latter issue leads to an unnecessary precedence system where configuration in one area may (or may not) override configuration in another.

Another place this shows up is sometimes you can edit the YAML through the web interface and sometimes you can’t. Or, as in my case, the precedence rules partially failed. I had only one zone defined but HA was confused as to where that was.

Hi, I also have to reduce the radius of the home area. I should delete the one set in the code and recreate it with the here. I also found the wrong information about the core.config files and removed them leaving only

{
  "version": 1,
  "minor_version": 3,
  "key": "core.config",
  "data": {
    "external_url": "https://xxx.xxx.xx",
    "internal_url": null,
    "time_zone": "Europe/Rome",
    "unit_system": "metric",
    "unit_system_v2": "metric",
    "language": "en"
  }
}

But now in the guide I see my house in the African sea :slight_smile:

You have no longitude or latitude specified. HA has no idea where you are.

You really shouldn’t ever have to edit the core.config file. Everything can be set in the UI. I believe if you go back to the General settings and reconfigure everything it should fix your core.config file. If not…

  1. STOP home assistant
  2. Copy the text below into core.config
  3. Change the data to the proper values
  4. Start home asstistant.
{
  "version": 1,
  "minor_version": 3,
  "key": "core.config",
  "data": {
    "latitude": 42.999999999999999,
    "longitude": -82.9999999999999,
    "elevation": 190,
    "unit_system_v2": "metric",
    "location_name": "Home",
    "time_zone": "America/Toronto",
    "external_url": null,
    "internal_url": null,
    "currency": "CAD",
    "country": "CA",
    "language": "en"
  }
}

Changing your home zone radius does have to be done manually, but it is done by customizing zone.home in your configuration.yaml, not by editing storage files.

homeassistant:
  customize:
    zone.home:
      radius: 50

I have the customizations in an external file. Thank you very much for your help… Following your advice to put the “radius: 10” in the customization file I got what I wanted.