Configuration not honored during initial onboarding process

I have the following snippet in my configuration.yaml, which according to my understanding of the documentation should work:

homeassistant:
  elevation: 375
  name: Zuhause
  latitude: 49.xxx
  longitude: 11.xxx
  unit_system: metric
  time_zone: Europe/Berlin

However this is not honored when Home Assistant is started for the first time. During the onboarding process, I’m still asked for my home location, elevation and/or time zone. If I don’t select anything, I will be located in Amsterdam.

Am I doing something wrong here? Has anyone else experienced the same issue?

First go through the onboarding process, then add that to your configuration.yaml. Not vice-versa.

Hm, then I’m mis-understanding this aspect. What sense does it make to first click through the onboarding wizard manually, and then define these settings in the configuration.yaml. They are stored “somewhere” (in .storage) anyway?

1 Like

It does not make sense, except you have to go through the onboarding process anyway on a new installation. Once finished, you can make the adjustments in configuration.yaml

not only that but in a new install the first thing it does is do onboarding… how do you even access configuration.yaml before onboarding anyway? (and getting samba or ssh access)

Well, I’m not running hass.io (but a Docker install), so I can put my configuration.yaml there in advance. I also do so for many other settings, which take effect immediately.

I still don’t get what the purpose of these settings are, if I change them after the onboarding. They are saved at this point anyway (somewhere in .storage).

Has anyone those keys set in his configuration?

1 Like

Mine are in configuration.yaml

Mine are in zones.yaml (a package file)

It means I can’t edit them through the front end including changing their radius.
But I have a file and I move that whenever I want
This was pretty much covered in the great yaml debate

Edit: though my other zones are present on the map, I’m not sure that my home location is actually honoured, it may just use the on boarding 'home" location - dunno
I just ‘make sure’ that they both agree

But are they put there automatically after the onboarding? Or have you put them there?

I put them there after onboarding.

Ok, but for what reason? After onboarding this information is stored in .storage/core.config, so it does not make sense to define it another place.

This seems to be broken by design to me. It should be prefilled / taken over during onboarding, otherwise it makes no sense at all.

1 Like

If I remember correctly (it is more than a year ago) I could only define my house during onboarding by using a map. I could not get it correct, so I used google to look up the coordinates of my house and put them in configuration.yaml. Problem fixed. Sometimes solutions can be simple :slight_smile:

That’s not easy, that’s broken. It should either be pre-selected and/or skipped during onboarding altogether.

Well, nevermind, thank you for explaining me your use-case(s) and making me understand, that this is indeed (not) working as expected.

I’ve created an issue on GitHub, see here.

Let’s see what the developers think about this and/or if anyone is willing to do something about it.

2 Likes

Hey man! If it still actual, I’m working on half-automated deploying of Hass.io to my fresh server to have possibility to make a lot of experiments in the uture and to have possibility to quick start from clean environment.

And i found the following. After installing HA Supervized, just run something like this:

sudo bash -c '
cat <<EOT > /usr/share/hassio/homeassistant/.storage/auth
{"version":1,"key":"auth","data":{"users":[{"id":"cae5c612beed4ee6b7de6be533c1f14a","group_ids":["system-admin"],"is_owner":false,"is_active":true,"name":"Hass.io","system_generated":true},{"id":"c0d46b795bc34a5bb4d7abc20a4b2921","group_ids":["system-admin"],"is_owner":true,"is_active":true,"name":"yourusername","system_generated":false},{"id":"cb16923462364109acb6b12c73275203","group_ids":["system-admin"],"is_owner":false,"is_active":true,"name":"mqttusr","system_generated":false}],"groups":[{"id":"system-admin","name":"Administrators"},{"id":"system-users","name":"Users"},{"id":"system-read-only","name":"Read Only"}],"credentials":[{"id":"0bdfa5ae98434f35a3eae8cc9bf6d9e1","user_id":"c0d46b795bc34a5bb4d7abc20a4b2921","auth_provider_type":"homeassistant","auth_provider_id":null,"data":{"username":"yourusername"}},{"id":"e00ab8c3b3844076bb15c88bbd89ac36","user_id":"cb16923462364109acb6b12c73275203","auth_provider_type":"homeassistant","auth_provider_id":null,"data":{"username":"mqttusr"}}],"refresh_tokens":[]}}
EOT

cat <<EOT > /usr/share/hassio/homeassistant/.storage/auth_provider.homeassistant
{"data":{"users":[{"password":"fiction","username":"yourusername"},{"password":"fiction","username":"mqttusr"}]},"key":"auth_provider.homeassistant","version":1}
EOT


cat <<EOT > /usr/share/hassio/homeassistant/.storage/core.config
{"data":{"elevation":250,"external_url":null,"internal_url":"http://192.168.1.100:8123","latitude":45.062159,"location_name":"HAZip34","longitude":39.009162,"time_zone":"Europe/Moscow","unit_system":"metric"},"key":"core.config","version":1}
EOT


cat <<EOT > /usr/share/hassio/homeassistant/.storage/onboarding
{"data":{"done":["user","core_config","integration","analytics"]},"key":"onboarding","version":4}
EOT

'

sudo ha auth reset --username "mqttusr" --password "mqttusr"
sudo ha auth reset --username "yourusername" --password "<your pass>"

sudo reboot

And after reboot i will able to just login to the HA via Web UI with your core config and login/pass