Migrate sensibo to use async_update_reload_and_abort (#110986)

This commit is contained in:
J. Nick Koston 2024-02-20 07:41:14 -06:00 committed by GitHub
parent 6471397d09
commit ad94534d37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,15 +57,13 @@ class SensiboConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
assert self.entry is not None
if username == self.entry.unique_id:
self.hass.config_entries.async_update_entry(
return self.async_update_reload_and_abort(
self.entry,
data={
**self.entry.data,
CONF_API_KEY: api_key,
},
)
await self.hass.config_entries.async_reload(self.entry.entry_id)
return self.async_abort(reason="reauth_successful")
errors["base"] = "incorrect_api_key"
return self.async_show_form(