mirror of
https://github.com/jdejaegh/irm-kmi-ha.git
synced 2025-06-27 03:35:56 +02:00
Fix hassfest validation
This commit is contained in:
parent
e1ffb2ec8e
commit
8d2fcbefb5
5 changed files with 8 additions and 8 deletions
|
@ -42,7 +42,7 @@ class IrmKmiConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
|
||||
if user_input:
|
||||
if CONF_LANGUAGE_OVERRIDE in user_input:
|
||||
user_input[CONF_LANGUAGE_OVERRIDE] = None if user_input[CONF_LANGUAGE_OVERRIDE] == 'None' \
|
||||
user_input[CONF_LANGUAGE_OVERRIDE] = None if user_input[CONF_LANGUAGE_OVERRIDE] == 'none' \
|
||||
else user_input[CONF_LANGUAGE_OVERRIDE]
|
||||
_LOGGER.debug(f"Provided config user is: {user_input}")
|
||||
|
||||
|
@ -99,7 +99,7 @@ class IrmKmiConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
mode=SelectSelectorMode.DROPDOWN,
|
||||
translation_key=CONF_USE_DEPRECATED_FORECAST)),
|
||||
|
||||
vol.Optional(CONF_LANGUAGE_OVERRIDE, default='None'):
|
||||
vol.Optional(CONF_LANGUAGE_OVERRIDE, default='none'):
|
||||
SelectSelector(SelectSelectorConfig(options=CONF_LANGUAGE_OVERRIDE_OPTIONS,
|
||||
mode=SelectSelectorMode.DROPDOWN,
|
||||
translation_key=CONF_LANGUAGE_OVERRIDE))
|
||||
|
@ -116,7 +116,7 @@ class IrmKmiOptionFlow(OptionsFlow):
|
|||
"""Manage the options."""
|
||||
if user_input is not None:
|
||||
if CONF_LANGUAGE_OVERRIDE in user_input:
|
||||
user_input[CONF_LANGUAGE_OVERRIDE] = None if user_input[CONF_LANGUAGE_OVERRIDE] == 'None' \
|
||||
user_input[CONF_LANGUAGE_OVERRIDE] = None if user_input[CONF_LANGUAGE_OVERRIDE] == 'none' \
|
||||
else user_input[CONF_LANGUAGE_OVERRIDE]
|
||||
_LOGGER.debug(user_input)
|
||||
return self.async_create_entry(data=user_input)
|
||||
|
@ -139,7 +139,7 @@ class IrmKmiOptionFlow(OptionsFlow):
|
|||
translation_key=CONF_USE_DEPRECATED_FORECAST)),
|
||||
|
||||
vol.Optional(CONF_LANGUAGE_OVERRIDE,
|
||||
default=str(get_config_value(self.config_entry, CONF_LANGUAGE_OVERRIDE))):
|
||||
default=str(get_config_value(self.config_entry, CONF_LANGUAGE_OVERRIDE)).lower()):
|
||||
SelectSelector(SelectSelectorConfig(options=CONF_LANGUAGE_OVERRIDE_OPTIONS,
|
||||
mode=SelectSelectorMode.DROPDOWN,
|
||||
translation_key=CONF_LANGUAGE_OVERRIDE))
|
||||
|
|
|
@ -61,7 +61,7 @@ CONF_USE_DEPRECATED_FORECAST_OPTIONS: Final = [
|
|||
CONF_LANGUAGE_OVERRIDE: Final = 'language_override'
|
||||
|
||||
CONF_LANGUAGE_OVERRIDE_OPTIONS: Final = [
|
||||
'None', "fr", "nl", "de", "en"
|
||||
'none', "fr", "nl", "de", "en"
|
||||
]
|
||||
|
||||
REPAIR_SOLUTION: Final = "repair_solution"
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
},
|
||||
"language_override": {
|
||||
"options": {
|
||||
"None": "Follow Home Assistant server language",
|
||||
"none": "Follow Home Assistant server language",
|
||||
"fr": "French",
|
||||
"nl": "Dutch",
|
||||
"de": "German",
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
},
|
||||
"language_override": {
|
||||
"options": {
|
||||
"None": "Langue du serveur Home Assistant",
|
||||
"none": "Langue du serveur Home Assistant",
|
||||
"fr": "Français",
|
||||
"nl": "Néerlandais",
|
||||
"de": "Allemand",
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
},
|
||||
"language_override": {
|
||||
"options": {
|
||||
"None": "Zelfde als Home Assistant server taal",
|
||||
"none": "Zelfde als Home Assistant server taal",
|
||||
"fr": "Frans",
|
||||
"nl": "Nederlands",
|
||||
"de": "Duits",
|
||||
|
|
Loading…
Add table
Reference in a new issue