Use new config entry update/abort helper in sense (#108691)

This commit is contained in:
J. Nick Koston 2024-01-22 13:24:15 -10:00 committed by GitHub
parent 426fce93aa
commit 12b41c35ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,11 +69,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
title=self._auth_data[CONF_EMAIL], data=self._auth_data
)
self.hass.config_entries.async_update_entry(
existing_entry, data=self._auth_data
)
await self.hass.config_entries.async_reload(existing_entry.entry_id)
return self.async_abort(reason="reauth_successful")
return self.async_update_reload_and_abort(existing_entry, data=self._auth_data)
async def validate_input_and_create_entry(self, user_input, errors):
"""Validate the input and create the entry from the data."""