mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Allow configuring country and language in core config (#81734)
* Allow configuring country and language in core config * Add script for updating list of countries * Use black for formatting * Fix quoting * Move country codes to a separate file * Address review comments * Add generated/countries.py * Get default language from owner account * Remove unused variable * Add script to generate list of supported languages * Add tests * Fix stale docsring * Use format_python_namespace * Correct async_user_store * Improve typing * Fix with_store decorator * Initialize language in core store migration * Fix startup * Tweak * Apply suggestions from code review Co-authored-by: Franck Nijhof <git@frenck.dev> * Update storage.py Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
@@ -948,6 +948,8 @@ async def test_config_defaults():
|
||||
assert config.safe_mode is False
|
||||
assert config.legacy_templates is False
|
||||
assert config.currency == "EUR"
|
||||
assert config.country is None
|
||||
assert config.language == "en"
|
||||
|
||||
|
||||
async def test_config_path_with_file():
|
||||
@@ -989,6 +991,8 @@ async def test_config_as_dict():
|
||||
"external_url": None,
|
||||
"internal_url": None,
|
||||
"currency": "EUR",
|
||||
"country": None,
|
||||
"language": "en",
|
||||
}
|
||||
|
||||
assert expected == config.as_dict()
|
||||
|
||||
Reference in New Issue
Block a user