diff --git a/homeassistant/components/verisure/config_flow.py b/homeassistant/components/verisure/config_flow.py index 9392cdd9bc1..1fcf0eb9de2 100644 --- a/homeassistant/components/verisure/config_flow.py +++ b/homeassistant/components/verisure/config_flow.py @@ -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, } ), diff --git a/tests/components/verisure/test_config_flow.py b/tests/components/verisure/test_config_flow.py index b1e67766df8..af102cced98 100644 --- a/tests/components/verisure/test_config_flow.py +++ b/tests/components/verisure/test_config_flow.py @@ -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(