Skip to content

Commit

Permalink
Fix problem with default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
BenPru committed Nov 20, 2022
1 parent 9afb327 commit f33cfb6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"*.yaml": "home-assistant"
}
}
2 changes: 1 addition & 1 deletion custom_components/luxtronik/helpers/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_sensor_text(lang: LANGUAGES, key: str) -> str:
__content_default__ = _load_lang_from_file(
f"../translations/texts.{LANG_DEFAULT}.json"
)
if lang != LANG_DEFAULT and key in __content_locale__:
if lang != LANG_DEFAULT and not __content_locale__ is None and key in __content_locale__:
return __content_locale__[key]
if key in __content_default__:
return __content_default__[key]
Expand Down
2 changes: 1 addition & 1 deletion custom_components/luxtronik/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "luxtronik2",
"name": "Luxtronik",
"version": "2022.11.18",
"version": "2022.11.20",
"config_flow": true,
"iot_class": "local_polling",
"documentation": "https://www.home-assistant.io/integrations/luxtronik",
Expand Down

0 comments on commit f33cfb6

Please sign in to comment.