Skip to content

Commit

Permalink
Merge pull request #66 from jdejaegh/62-set-option-flow-config_entry-…
Browse files Browse the repository at this point in the history
…explicitly

Rename internal variable of IrmKmiOptionFlow to avoid name clash
  • Loading branch information
jdejaegh authored Dec 29, 2024
2 parents 34cb9e1 + 0de029b commit 3ede45a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions custom_components/irm_kmi/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async def async_step_user(self, user_input: dict | None = None) -> FlowResult:
class IrmKmiOptionFlow(OptionsFlow):
def __init__(self, config_entry: ConfigEntry) -> None:
"""Initialize options flow."""
self.config_entry = config_entry
self.current_config_entry = config_entry

async def async_step_init(self, user_input: dict | None = None) -> FlowResult:
"""Manage the options."""
Expand All @@ -119,21 +119,21 @@ async def async_step_init(self, user_input: dict | None = None) -> FlowResult:
step_id="init",
data_schema=vol.Schema(
{
vol.Optional(CONF_STYLE, default=get_config_value(self.config_entry, CONF_STYLE)):
vol.Optional(CONF_STYLE, default=get_config_value(self.current_config_entry, CONF_STYLE)):
SelectSelector(SelectSelectorConfig(options=CONF_STYLE_OPTIONS,
mode=SelectSelectorMode.DROPDOWN,
translation_key=CONF_STYLE)),

vol.Optional(CONF_DARK_MODE, default=get_config_value(self.config_entry, CONF_DARK_MODE)): bool,
vol.Optional(CONF_DARK_MODE, default=get_config_value(self.current_config_entry, CONF_DARK_MODE)): bool,

vol.Optional(CONF_USE_DEPRECATED_FORECAST,
default=get_config_value(self.config_entry, CONF_USE_DEPRECATED_FORECAST)):
default=get_config_value(self.current_config_entry, CONF_USE_DEPRECATED_FORECAST)):
SelectSelector(SelectSelectorConfig(options=CONF_USE_DEPRECATED_FORECAST_OPTIONS,
mode=SelectSelectorMode.DROPDOWN,
translation_key=CONF_USE_DEPRECATED_FORECAST)),

vol.Optional(CONF_LANGUAGE_OVERRIDE,
default=get_config_value(self.config_entry, CONF_LANGUAGE_OVERRIDE)):
default=get_config_value(self.current_config_entry, CONF_LANGUAGE_OVERRIDE)):
SelectSelector(SelectSelectorConfig(options=CONF_LANGUAGE_OVERRIDE_OPTIONS,
mode=SelectSelectorMode.DROPDOWN,
translation_key=CONF_LANGUAGE_OVERRIDE))
Expand Down

0 comments on commit 3ede45a

Please sign in to comment.