Use new helper properties in yalexs_ble options flow (#129790)
This commit is contained in:
parent
595459bfda
commit
0883b23d0c
1 changed files with 4 additions and 6 deletions
|
@ -312,16 +312,12 @@ class YalexsConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
config_entry: ConfigEntry,
|
||||
) -> YaleXSBLEOptionsFlowHandler:
|
||||
"""Get the options flow for this handler."""
|
||||
return YaleXSBLEOptionsFlowHandler(config_entry)
|
||||
return YaleXSBLEOptionsFlowHandler()
|
||||
|
||||
|
||||
class YaleXSBLEOptionsFlowHandler(OptionsFlow):
|
||||
"""Handle YaleXSBLE options."""
|
||||
|
||||
def __init__(self, config_entry: ConfigEntry) -> None:
|
||||
"""Initialize YaleXSBLE options flow."""
|
||||
self.entry = config_entry
|
||||
|
||||
async def async_step_init(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
|
@ -343,7 +339,9 @@ class YaleXSBLEOptionsFlowHandler(OptionsFlow):
|
|||
{
|
||||
vol.Optional(
|
||||
CONF_ALWAYS_CONNECTED,
|
||||
default=self.entry.options.get(CONF_ALWAYS_CONNECTED, False),
|
||||
default=self.config_entry.options.get(
|
||||
CONF_ALWAYS_CONNECTED, False
|
||||
),
|
||||
): bool,
|
||||
}
|
||||
),
|
||||
|
|
Loading…
Add table
Reference in a new issue