The country has not been configured

I would rather like to know WHY does it even ask for a country?

5 Likes

If you go to settings > system > general > you can set it up there as well…just choose your country in the drop down menu, and i see Noway in the drop down fyi.

I get this error:

Integration error: country - Integration 'country' not found.

1 Like

This worked for me after updating to the December HA release and getting the “country has not been configured” message. Did not need to use quotes around my country code.

Me neither :), not quotes

country: nb_NO dont work either, After trying NO of course.

Even if YAML mode is used???

This is a development oversight i’m assuming? That aside, I live in the UK and thought that my country code would be UK. Using double quotes or no quotes my system goes into safe mode. I have to configure via config.yaml owing other configs. anyone any ideas?

It will not let you update the country in the settings if you have your config in the configuration.yaml.
“Editor disabled because config stored in configuration.yaml.”
I tried to add “Country: US” in the yaml (without the indent) and I got this in developer tools (check configuration):
“Integration error: Country - Integration ‘Country’ not found.”
With the indent, Visual Studio gave me this error:
“Property Country is not allowed”

UK country code as per the ISO standard is GB. Doesnt need quotes. I just ctrl refreshed my settings → system → general and the new box popped up to set it via the UI.

Anyone needing to find there country code can use this wikipedia page. List of ISO 3166 country codes - Wikipedia

2 Likes

I figured out how to get the country into the configuration.yaml. I edited the configuration.yaml file outside of the home assistant editors.

So the error I was getting when using the HA version of VS Code ( Property Country is not allowed) was leading me astray.

  1. Opened the file in an outside editor
  2. I then added a tab and “country: US” (no quotes) after time zone
  3. Saved the file
  4. went into developer tools and hit “check configuration”
  5. It was green so I hit restart

Here is an example of my configuration.yaml (the indents are important):

homeassistant:
  name: Home
  latitude: 19.651760
  longitude: -89.281960
  unit_system: imperial
  time_zone: America/New_York
  country: US
  external_url: xxxxx
  internal_url: xxxxx

Maybe HA devs should fall back on time zone if no country is listed (just an option)

4 Likes

I also had the HomeAssistant: section in my yaml causing the settings for country and other items to be greyed out, and wanted to configure more stuff via the UI. At Setup basic information - Home Assistant (home-assistant.io) it says what lines in your yaml you need to remove or de-activate (“You will not be able to edit anything in Settings > System > General in the UI if you are using YAML configuration for any of the following: name, latitude, longitude, elevation, unit_system, temperature_unit, time_zone, external_url, internal_url.”) … after removing those (so not the HomeAssistant-line) i can now edit more stuff via the UI, including country (from a list)

3 Likes

It’s not neccesary to be so unfriendly.
It is not even fixed in the released version 2022.12.
fixed it with the constructive contributions mentioned here.

3 Likes

Well it was fixed in b1 for me, perhaps my cache cleared itself or was refreshed by something else. It may also be related to when the latest frontend is installed.

I am not sure what is unfriendly about referring to the beta rules.

As for Norway, I suspect NO has to be quoted because the yaml gets confused between NO the country and NO the binary (same as 0, false, etc)

I get the error/warning that ‘Property country is not allowed.’ But it restarts just fine and the repair warning goes away.

1 Like

Clearly VS Code needs to catch up, but home assistant didn’t throw this error.

I got the same error/warning “Property country is not allowed” while editing using Studio Code. Ignored the message, restarted HA and all good.

Settings - System - General and you can set it in the latest version

I get the same results that @msymms did. I edited the code, checked with dev tools, and even though the error is still present, I rebooted, and my system is good to go.