mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Use new helper properties in verisure options flow (#129788)
This commit is contained in:
parent
6a22a2b867
commit
cdc67aa891
@ -43,9 +43,11 @@ class VerisureConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@callback
|
@callback
|
||||||
def async_get_options_flow(config_entry: ConfigEntry) -> VerisureOptionsFlowHandler:
|
def async_get_options_flow(
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
) -> VerisureOptionsFlowHandler:
|
||||||
"""Get the options flow for this handler."""
|
"""Get the options flow for this handler."""
|
||||||
return VerisureOptionsFlowHandler(config_entry)
|
return VerisureOptionsFlowHandler()
|
||||||
|
|
||||||
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
|
||||||
@ -290,10 +292,6 @@ class VerisureConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
class VerisureOptionsFlowHandler(OptionsFlow):
|
class VerisureOptionsFlowHandler(OptionsFlow):
|
||||||
"""Handle Verisure options."""
|
"""Handle Verisure options."""
|
||||||
|
|
||||||
def __init__(self, entry: ConfigEntry) -> None:
|
|
||||||
"""Initialize Verisure options flow."""
|
|
||||||
self.entry = 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:
|
||||||
@ -310,7 +308,7 @@ class VerisureOptionsFlowHandler(OptionsFlow):
|
|||||||
vol.Optional(
|
vol.Optional(
|
||||||
CONF_LOCK_CODE_DIGITS,
|
CONF_LOCK_CODE_DIGITS,
|
||||||
description={
|
description={
|
||||||
"suggested_value": self.entry.options.get(
|
"suggested_value": self.config_entry.options.get(
|
||||||
CONF_LOCK_CODE_DIGITS, DEFAULT_LOCK_CODE_DIGITS
|
CONF_LOCK_CODE_DIGITS, DEFAULT_LOCK_CODE_DIGITS
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user