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
2 changed files with 10 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue