mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Migrate sensibo to use async_update_reload_and_abort (#110986)
This commit is contained in:
parent
6471397d09
commit
ad94534d37
@ -57,15 +57,13 @@ class SensiboConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
assert self.entry is not None
|
assert self.entry is not None
|
||||||
|
|
||||||
if username == self.entry.unique_id:
|
if username == self.entry.unique_id:
|
||||||
self.hass.config_entries.async_update_entry(
|
return self.async_update_reload_and_abort(
|
||||||
self.entry,
|
self.entry,
|
||||||
data={
|
data={
|
||||||
**self.entry.data,
|
**self.entry.data,
|
||||||
CONF_API_KEY: api_key,
|
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"
|
errors["base"] = "incorrect_api_key"
|
||||||
|
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user