Use new helper properties in tomorrowio options flow (#129787)
parent
cdc67aa891
commit
cdd5cb2876
|
@ -91,10 +91,6 @@ def _get_unique_id(hass: HomeAssistant, input_dict: dict[str, Any]):
|
|||
class TomorrowioOptionsConfigFlow(OptionsFlow):
|
||||
"""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(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
|
@ -105,7 +101,7 @@ class TomorrowioOptionsConfigFlow(OptionsFlow):
|
|||
options_schema = {
|
||||
vol.Required(
|
||||
CONF_TIMESTEP,
|
||||
default=self._config_entry.options[CONF_TIMESTEP],
|
||||
default=self.config_entry.options[CONF_TIMESTEP],
|
||||
): vol.In([1, 5, 15, 30, 60]),
|
||||
}
|
||||
|
||||
|
@ -125,7 +121,7 @@ class TomorrowioConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
config_entry: ConfigEntry,
|
||||
) -> TomorrowioOptionsConfigFlow:
|
||||
"""Get the options flow for this handler."""
|
||||
return TomorrowioOptionsConfigFlow(config_entry)
|
||||
return TomorrowioOptionsConfigFlow()
|
||||
|
||||
async def async_step_user(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
|
|
Loading…
Reference in New Issue