Use new helper properties in tomorrowio options flow (#129787)

pull/129794/head
epenet 2024-11-04 09:39:13 +01:00 committed by GitHub
parent cdc67aa891
commit cdd5cb2876
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 6 deletions

View File

@ -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