Use new config entry update/abort helper in enphase_envoy (#108679)

Use new config entry update/abort helper in enphase_envoy

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:43:12 -10:00 committed by GitHub
parent 4bf4bc7e9b
commit d825c85351
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,16 +164,10 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
name = self._async_envoy_name()
if self._reauth_entry:
self.hass.config_entries.async_update_entry(
return self.async_update_reload_and_abort(
self._reauth_entry,
data=self._reauth_entry.data | user_input,
)
self.hass.async_create_task(
self.hass.config_entries.async_reload(
self._reauth_entry.entry_id
)
)
return self.async_abort(reason="reauth_successful")
if not self.unique_id:
await self.async_set_unique_id(envoy.serial_number)