mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Use new helper properties in konnected options flow (#129778)
This commit is contained in:
parent
7fd261347b
commit
81735b7b47
@ -402,9 +402,10 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
|
|
||||||
def __init__(self, config_entry: ConfigEntry) -> None:
|
def __init__(self, config_entry: ConfigEntry) -> None:
|
||||||
"""Initialize options flow."""
|
"""Initialize options flow."""
|
||||||
self.entry = config_entry
|
self.model = config_entry.data[CONF_MODEL]
|
||||||
self.model = self.entry.data[CONF_MODEL]
|
self.current_opt = (
|
||||||
self.current_opt = self.entry.options or self.entry.data[CONF_DEFAULT_OPTIONS]
|
config_entry.options or config_entry.data[CONF_DEFAULT_OPTIONS]
|
||||||
|
)
|
||||||
|
|
||||||
# as config proceeds we'll build up new options and then replace what's in the config entry
|
# as config proceeds we'll build up new options and then replace what's in the config entry
|
||||||
self.new_opt: dict[str, Any] = {CONF_IO: {}}
|
self.new_opt: dict[str, Any] = {CONF_IO: {}}
|
||||||
@ -475,7 +476,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
),
|
),
|
||||||
description_placeholders={
|
description_placeholders={
|
||||||
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
||||||
"host": self.entry.data[CONF_HOST],
|
"host": self.config_entry.data[CONF_HOST],
|
||||||
},
|
},
|
||||||
errors=errors,
|
errors=errors,
|
||||||
)
|
)
|
||||||
@ -511,7 +512,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
),
|
),
|
||||||
description_placeholders={
|
description_placeholders={
|
||||||
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
||||||
"host": self.entry.data[CONF_HOST],
|
"host": self.config_entry.data[CONF_HOST],
|
||||||
},
|
},
|
||||||
errors=errors,
|
errors=errors,
|
||||||
)
|
)
|
||||||
@ -571,7 +572,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
),
|
),
|
||||||
description_placeholders={
|
description_placeholders={
|
||||||
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
||||||
"host": self.entry.data[CONF_HOST],
|
"host": self.config_entry.data[CONF_HOST],
|
||||||
},
|
},
|
||||||
errors=errors,
|
errors=errors,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user