Fix small type issues [core] (#75760)

This commit is contained in:
Marc Mueller
2022-07-26 16:28:22 +02:00
committed by GitHub
parent 9ad273a59f
commit af7df260a0
4 changed files with 6 additions and 5 deletions

View File

@@ -320,6 +320,7 @@ class NotifySetupFlow(SetupFlow):
errors: dict[str, str] = {}
hass = self._auth_module.hass
assert self._secret and self._count
if user_input:
verified = await hass.async_add_executor_job(
_verify_otp, self._secret, user_input["code"], self._count
@@ -334,7 +335,6 @@ class NotifySetupFlow(SetupFlow):
errors["base"] = "invalid_code"
# generate code every time, no retry logic
assert self._secret and self._count
code = await hass.async_add_executor_job(
_generate_otp, self._secret, self._count
)