mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Remove constructor in WLED Options flow (#112456)
This commit is contained in:
parent
0a11cb5382
commit
4d6a910e64
@ -11,7 +11,7 @@ from homeassistant.config_entries import (
|
|||||||
ConfigEntry,
|
ConfigEntry,
|
||||||
ConfigFlow,
|
ConfigFlow,
|
||||||
ConfigFlowResult,
|
ConfigFlowResult,
|
||||||
OptionsFlow,
|
OptionsFlowWithConfigEntry,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST, CONF_MAC
|
from homeassistant.const import CONF_HOST, CONF_MAC
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
@ -121,13 +121,9 @@ class WLEDFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
return await wled.update()
|
return await wled.update()
|
||||||
|
|
||||||
|
|
||||||
class WLEDOptionsFlowHandler(OptionsFlow):
|
class WLEDOptionsFlowHandler(OptionsFlowWithConfigEntry):
|
||||||
"""Handle WLED options."""
|
"""Handle WLED options."""
|
||||||
|
|
||||||
def __init__(self, config_entry: ConfigEntry) -> None:
|
|
||||||
"""Initialize WLED 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:
|
||||||
@ -141,7 +137,7 @@ class WLEDOptionsFlowHandler(OptionsFlow):
|
|||||||
{
|
{
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
CONF_KEEP_MAIN_LIGHT,
|
CONF_KEEP_MAIN_LIGHT,
|
||||||
default=self.config_entry.options.get(
|
default=self.options.get(
|
||||||
CONF_KEEP_MAIN_LIGHT, DEFAULT_KEEP_MAIN_LIGHT
|
CONF_KEEP_MAIN_LIGHT, DEFAULT_KEEP_MAIN_LIGHT
|
||||||
),
|
),
|
||||||
): bool,
|
): bool,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user