Use async_update_reload_and_abort in bosch_shc config flow (#127436)

This commit is contained in:
epenet 2024-10-03 14:41:07 +02:00 committed by GitHub
parent c957c7a515
commit 49882112ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -175,12 +175,10 @@ class BoschSHCConfigFlow(ConfigFlow, domain=DOMAIN):
}
existing_entry = await self.async_set_unique_id(self.info["unique_id"])
if existing_entry:
self.hass.config_entries.async_update_entry(
return self.async_update_reload_and_abort(
existing_entry,
data=entry_data,
)
await self.hass.config_entries.async_reload(existing_entry.entry_id)
return self.async_abort(reason="reauth_successful")
return self.async_create_entry(
title=cast(str, self.info["title"]),