How about letting us set the home location through the web interface?

If I go to Settings | System | General and select “Edit location”, it takes me to the Areas & Zones page. If I click on the edit icon beside MyHome, it takes me back to the General page. There seems to be no way to actually edit my home location through the web interface.

I can only add a new zone, which then brings up a panel that lets me manually set the longitude and latitude of the new zone. However, even if I give the new zone the same name as my home location, it simply creates a new (duplicate-name) zone.

Using the file editor add-on, I can try to change the location by editing a .yaml file, but that doesn’t actually change the original zone. It seems to set a location but not the full one as I’m still getting sunrise and sunset times from Amsterdam and not from my actual location.

Clearly the programmers know how to read and set a zone’s location through the web interface. Shouldn’t they be able to let us modify a zone’s location (especially the original one) as well?

Yes, it’s annoying that you can’t do it through the UI.

However, you can do it in config.yaml. I have this and it overrides the home zone.

zone:
  - name: Home
    latitude: XX.XXXXXXXXXX
    longitude: YY.YYYYYYYYYYY
    radius: 25
    icon: mdi:account-multiple

I already have something like that but it starts with:

zone.Home:

and it doesn’t quite work. The home location is deriving sunrise and sunset times from Amsterdam instead of the coordinates I provided.

In another conversation, I found that the “correct” way is to edit .storage/core.config, which is where the latitude and longitude values are stored. The file editor doesn’t let you see the hidden folder so you need to use an ssh session to do it.

Another person pointed out that there is a GUI way to do it - dragging the pin icon to the location you want. While for an intercontinental move, this involves a lot of work, it is doable.

editing files in storage is not the ‘correct’ way.

Zone - Home Assistant (home-assistant.io)

The way I did it, is the documented way. The reason your zone.Home: doesnt work, is that it is incorrect too.

The GUI way actually does adjust the JSON file in .storage while adding zones in config.yaml probably leads to the situation I experienced - the “real” JSON-defined home location has the wrong location. If your home location is close to the one in the JSON file, you may not notice the discrepancy because the maps almost always show the .yaml zones.

The gui is fine, the way I posted is correct and works perfectly. However doesn’t allow for zone size overrides etc.

What you tried was not what I posted.

And what I posted also works. It created a new zone with a duplicate name. Unfortunately deleting the old zone didn’t change the JSON file that defined it.

The real problem is that Home Assistant hasn’t quite figured out how configurations should be specified. Instead its got a confusion of JSON and yaml files with byzantine rules regarding precedence.

It would be cleaner to create a bunch of files (using only one format) for each type of thing, or possibly a folder for each type of thing, with each thing defined in a separate file. e.g. have a zones file (or zones.d folder) so that all zones are defined once and in one location.

So it didn’t work, I get no duplicate, I just followed the basic instructions, got no duplicate, achieved what I wanted.

The json in .storage is not designed to be played with, it’s created from the gui, and to a lesser extent the yaml. There is no json configuration required for core components, only gui or yaml.

HA’s not perfect but you clearly didn’t read the documentation, which is clear on how what you wanted could be done, then spent time digging around in the files that are supposed to be left alone.

I’m unsubscribing from this now, I’ve tried to help you and wasted my time.

Yes, you did waste your time because you completely ignored the real problem, which is that the CORRECT solution is for the Web interface to allow you to change the Home location, which is and has been for ages impossible.

1 Like

And good luck getting access to config.yaml without shutting down the server, yanking the memory card and inserting it into your desktop. This is light years from user-friendly.

1 Like

Funny I was able to edit my location easily in the web interface by clicking Edit Zone (top right) and then dragging my Home Icon to it’s correct location. Had zero problems doing so.

TRI0N

No you are wrong.

More nonsense.