Use new config entry update/abort helper in enphase-envoy (part 2) (#108689)

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 12:19:55 -10:00 committed by GitHub
parent 0b79504cf0
commit def42c6da0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,13 +103,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
and entry.data[CONF_HOST] == self.ip_address
):
title = f"{ENVOY} {serial}" if entry.title == ENVOY else ENVOY
self.hass.config_entries.async_update_entry(
entry, title=title, unique_id=serial
return self.async_update_reload_and_abort(
entry, title=title, unique_id=serial, reason="already_configured"
)
self.hass.async_create_task(
self.hass.config_entries.async_reload(entry.entry_id)
)
return self.async_abort(reason="already_configured")
return await self.async_step_user()