mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Use async_update_reload_and_abort in airvisual (#127429)
Use async_update_reload_and_abort in arivisual
This commit is contained in:
parent
4cef435089
commit
59e486848c
@ -141,11 +141,7 @@ class AirVisualFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
valid_keys.add(user_input[CONF_API_KEY])
|
valid_keys.add(user_input[CONF_API_KEY])
|
||||||
|
|
||||||
if existing_entry := await self.async_set_unique_id(self._geo_id):
|
if existing_entry := await self.async_set_unique_id(self._geo_id):
|
||||||
self.hass.config_entries.async_update_entry(existing_entry, data=user_input)
|
return self.async_update_reload_and_abort(existing_entry, data=user_input)
|
||||||
self.hass.async_create_task(
|
|
||||||
self.hass.config_entries.async_reload(existing_entry.entry_id)
|
|
||||||
)
|
|
||||||
return self.async_abort(reason="reauth_successful")
|
|
||||||
|
|
||||||
return self.async_create_entry(
|
return self.async_create_entry(
|
||||||
title=f"Cloud API ({self._geo_id})",
|
title=f"Cloud API ({self._geo_id})",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user