core: Information about location is not taken over from configuration file during onboarding

The problem

I have the following information in my configuration.yaml:

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

However this information is not respected / taken over / pre-filled during the onboarding process. I’m still asked for exactly this kind of information (location, elevation, time zone, unit system, etc.). None of this is pre-filled with the information from the configuration.yaml.

Once I’m done with the on-boarding this information is stored inside .storage/core.config:

{
    "data": {
        "elevation": 375,
        "latitude": 49.xxx,
        "location_name": "Zuhause",
        "longitude": 11.xxx,
        "time_zone": "Europe/Berlin",
        "unit_system": "metric"
    },
    "key": "core.config",
    "version": 1
}

This does not make any sense:

  • The options are not honored during onboarding, i.e. I’m still being asked for it
  • Once the onboarding is done, the information is stored “internally”, so why have it in configuration.yaml at all? This is redundant and a bad user experience.

From my point of view (as a user), the appropriate fields should be pre-filled/ pre-selected at least (and/or skipped altogether), when such information is found in the configuration.yaml.

Environment

Problem-relevant configuration.yaml

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 7
  • Comments: 19 (5 by maintainers)

Most upvoted comments

If you decide to override it, feel free to, but that hasn’t anything to do with the UI.

Well, shouldn’t the UI just use this values during onboarding and not ignore them and let me choose different ones?

I can agree that this is not necessarily a high priority, but saying this has “nothing to do with UI” seems wrong to me, since the UI asks for me something that is actually already defined / configured.

Given that the “automatic location detection” is totally broken for me, I find it annoying to re-configure those parameters over and over again - although I have them already specified in YAML.

I would also appreciate if this is reopened.

How I managed to load the configuration from the respective YAML file (configuration.yaml) is by skipping the core config step by adding .storage/onboarding (to my private repository, containing my initial Home Assistant configuration), with the following content:

{
    "version": 3,
    "key": "onboarding",
    "data": {
        "done": [
            "core_config"
        ]
    }
}

This way it will just prompt user creation and integration setup at onboarding.

Once those keys are configuration.yaml, they take precedence over storage as the system known you are using yaml instead of storage for those items.

You will see if you openconfiguration>general you cannot edit the items and it should say set by yaml