mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
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:
parent
e7be9cb447
commit
d7273d66ab
@ -181,15 +181,7 @@ class BTHomeConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
if entry_id := self.context.get("entry_id"):
|
if entry_id := self.context.get("entry_id"):
|
||||||
entry = self.hass.config_entries.async_get_entry(entry_id)
|
entry = self.hass.config_entries.async_get_entry(entry_id)
|
||||||
assert entry is not None
|
assert entry is not None
|
||||||
|
return self.async_update_reload_and_abort(entry, data=data)
|
||||||
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_create_entry(
|
return self.async_create_entry(
|
||||||
title=self.context["title_placeholders"]["name"],
|
title=self.context["title_placeholders"]["name"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user