Use new config entry update/abort helper in bthome (#108676)

Use new config entry update/abort helper in bthome

uses the new helper from https://github.com/home-assistant/core/pull/108034
This commit is contained in:
J. Nick Koston 2024-01-22 11:14:00 -10:00 committed by GitHub
parent e7be9cb447
commit d7273d66ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -181,15 +181,7 @@ class BTHomeConfigFlow(ConfigFlow, domain=DOMAIN):
if entry_id := self.context.get("entry_id"):
entry = self.hass.config_entries.async_get_entry(entry_id)
assert entry is not None
self.hass.config_entries.async_update_entry(entry, data=data)
# Reload the config entry to notify of updated config
self.hass.async_create_task(
self.hass.config_entries.async_reload(entry.entry_id)
)
return self.async_abort(reason="reauth_successful")
return self.async_update_reload_and_abort(entry, data=data)
return self.async_create_entry(
title=self.context["title_placeholders"]["name"],