Use new helper properties in tomorrowio options flow (#129787)
This commit is contained in:
parent
cdc67aa891
commit
cdd5cb2876
1 changed files with 2 additions and 6 deletions
|
@ -91,10 +91,6 @@ def _get_unique_id(hass: HomeAssistant, input_dict: dict[str, Any]):
|
||||||
class TomorrowioOptionsConfigFlow(OptionsFlow):
|
class TomorrowioOptionsConfigFlow(OptionsFlow):
|
||||||
"""Handle Tomorrow.io options."""
|
"""Handle Tomorrow.io options."""
|
||||||
|
|
||||||
def __init__(self, config_entry: ConfigEntry) -> None:
|
|
||||||
"""Initialize Tomorrow.io options flow."""
|
|
||||||
self._config_entry = config_entry
|
|
||||||
|
|
||||||
async def async_step_init(
|
async def async_step_init(
|
||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
|
@ -105,7 +101,7 @@ class TomorrowioOptionsConfigFlow(OptionsFlow):
|
||||||
options_schema = {
|
options_schema = {
|
||||||
vol.Required(
|
vol.Required(
|
||||||
CONF_TIMESTEP,
|
CONF_TIMESTEP,
|
||||||
default=self._config_entry.options[CONF_TIMESTEP],
|
default=self.config_entry.options[CONF_TIMESTEP],
|
||||||
): vol.In([1, 5, 15, 30, 60]),
|
): vol.In([1, 5, 15, 30, 60]),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +121,7 @@ class TomorrowioConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
config_entry: ConfigEntry,
|
config_entry: ConfigEntry,
|
||||||
) -> TomorrowioOptionsConfigFlow:
|
) -> TomorrowioOptionsConfigFlow:
|
||||||
"""Get the options flow for this handler."""
|
"""Get the options flow for this handler."""
|
||||||
return TomorrowioOptionsConfigFlow(config_entry)
|
return TomorrowioOptionsConfigFlow()
|
||||||
|
|
||||||
async def async_step_user(
|
async def async_step_user(
|
||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
|
|
Loading…
Add table
Reference in a new issue