mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +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:
|
||||
"""Initialize options flow."""
|
||||
self.entry = config_entry
|
||||
self.model = self.entry.data[CONF_MODEL]
|
||||
self.current_opt = self.entry.options or self.entry.data[CONF_DEFAULT_OPTIONS]
|
||||
self.model = config_entry.data[CONF_MODEL]
|
||||
self.current_opt = (
|
||||
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
|
||||
self.new_opt: dict[str, Any] = {CONF_IO: {}}
|
||||
@ -475,7 +476,7 @@ class OptionsFlowHandler(OptionsFlow):
|
||||
),
|
||||
description_placeholders={
|
||||
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
||||
"host": self.entry.data[CONF_HOST],
|
||||
"host": self.config_entry.data[CONF_HOST],
|
||||
},
|
||||
errors=errors,
|
||||
)
|
||||
@ -511,7 +512,7 @@ class OptionsFlowHandler(OptionsFlow):
|
||||
),
|
||||
description_placeholders={
|
||||
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
||||
"host": self.entry.data[CONF_HOST],
|
||||
"host": self.config_entry.data[CONF_HOST],
|
||||
},
|
||||
errors=errors,
|
||||
)
|
||||
@ -571,7 +572,7 @@ class OptionsFlowHandler(OptionsFlow):
|
||||
),
|
||||
description_placeholders={
|
||||
"model": KONN_PANEL_MODEL_NAMES[self.model],
|
||||
"host": self.entry.data[CONF_HOST],
|
||||
"host": self.config_entry.data[CONF_HOST],
|
||||
},
|
||||
errors=errors,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user