mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Use new helper properties in watttime options flow (#129789)
This commit is contained in:
parent
0883b23d0c
commit
6a22a2b867
@ -126,9 +126,11 @@ class WattTimeConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
@staticmethod
|
||||
@callback
|
||||
def async_get_options_flow(config_entry: ConfigEntry) -> OptionsFlow:
|
||||
def async_get_options_flow(
|
||||
config_entry: ConfigEntry,
|
||||
) -> WattTimeOptionsFlowHandler:
|
||||
"""Define the config flow to handle options."""
|
||||
return WattTimeOptionsFlowHandler(config_entry)
|
||||
return WattTimeOptionsFlowHandler()
|
||||
|
||||
async def async_step_coordinates(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
@ -241,10 +243,6 @@ class WattTimeConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
class WattTimeOptionsFlowHandler(OptionsFlow):
|
||||
"""Handle a WattTime options flow."""
|
||||
|
||||
def __init__(self, entry: ConfigEntry) -> None:
|
||||
"""Initialize."""
|
||||
self.entry = entry
|
||||
|
||||
async def async_step_init(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
@ -258,7 +256,7 @@ class WattTimeOptionsFlowHandler(OptionsFlow):
|
||||
{
|
||||
vol.Required(
|
||||
CONF_SHOW_ON_MAP,
|
||||
default=self.entry.options.get(CONF_SHOW_ON_MAP, True),
|
||||
default=self.config_entry.options.get(CONF_SHOW_ON_MAP, True),
|
||||
): bool
|
||||
}
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user