Address late review in sharkiq config flow (#64554)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-20 13:56:25 +01:00 committed by GitHub
parent 31a9d64572
commit 0fd003b21e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,11 +84,10 @@ class SharkIqConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
_, errors = await self._async_validate_input(user_input)
if not errors:
entry = await self.async_set_unique_id(self.unique_id)
if entry:
errors = {"base": "unknown"}
if entry := await self.async_set_unique_id(self.unique_id):
self.hass.config_entries.async_update_entry(entry, data=user_input)
return self.async_abort(reason="reauth_successful")
return self.async_abort(reason="reauth_successful")
if errors["base"] != "invalid_auth":
return self.async_abort(reason=errors["base"])