Use new reauth helpers in weatherflow_cloud (#128821)
This commit is contained in:
parent
d9fd2c28b0
commit
b588bd6e4f
1 changed files with 5 additions and 9 deletions
|
@ -49,13 +49,9 @@ class WeatherFlowCloudConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
errors = await _validate_api_token(api_token)
|
errors = await _validate_api_token(api_token)
|
||||||
if not errors:
|
if not errors:
|
||||||
# Update the existing entry and abort
|
# Update the existing entry and abort
|
||||||
if existing_entry := self.hass.config_entries.async_get_entry(
|
|
||||||
self.context["entry_id"]
|
|
||||||
):
|
|
||||||
return self.async_update_reload_and_abort(
|
return self.async_update_reload_and_abort(
|
||||||
existing_entry,
|
self._get_reauth_entry(),
|
||||||
data={CONF_API_TOKEN: api_token},
|
data={CONF_API_TOKEN: api_token},
|
||||||
reason="reauth_successful",
|
|
||||||
reload_even_if_entry_is_unchanged=False,
|
reload_even_if_entry_is_unchanged=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue