mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Fix setting number of digits for verisure lock PIN (#95449)
* Fix error when setting number of digits * Update test_config_flow.py Add test for empty code
This commit is contained in:
parent
3d84c6e21c
commit
4959fce1e0
@ -329,7 +329,7 @@ class VerisureOptionsFlowHandler(OptionsFlow):
|
||||
): int,
|
||||
vol.Optional(
|
||||
CONF_LOCK_DEFAULT_CODE,
|
||||
default=self.entry.options.get(CONF_LOCK_DEFAULT_CODE),
|
||||
default=self.entry.options.get(CONF_LOCK_DEFAULT_CODE, ""),
|
||||
): str,
|
||||
}
|
||||
),
|
||||
|
@ -583,6 +583,15 @@ async def test_reauth_flow_errors(
|
||||
CONF_LOCK_CODE_DIGITS: DEFAULT_LOCK_CODE_DIGITS,
|
||||
},
|
||||
),
|
||||
(
|
||||
{
|
||||
CONF_LOCK_CODE_DIGITS: 5,
|
||||
},
|
||||
{
|
||||
CONF_LOCK_CODE_DIGITS: 5,
|
||||
CONF_LOCK_DEFAULT_CODE: "",
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_options_flow(
|
||||
|
Loading…
x
Reference in New Issue
Block a user