From e3f40d3681643da5d451117524e584b9587d9e73 Mon Sep 17 00:00:00 2001 From: Stefan Slivinski Date: Wed, 29 Apr 2026 20:24:20 -0700 Subject: [PATCH] fix(coordinator): pass config_entry to DataUpdateCoordinator super().__init__ Newer Home Assistant versions require config_entry to be set on the coordinator so async_config_entry_first_refresh can resolve the entry. Without it, reload after options change raised: ConfigEntryError: Detected code that uses async_config_entry_first_refresh, which is only supported for coordinators with a config entry Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- custom_components/generac/coordinator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/custom_components/generac/coordinator.py b/custom_components/generac/coordinator.py index 8ba2158..155be40 100644 --- a/custom_components/generac/coordinator.py +++ b/custom_components/generac/coordinator.py @@ -30,7 +30,13 @@ def __init__( scan_interval = timedelta( seconds=config_entry.options.get(CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL) ) - super().__init__(hass, _LOGGER, name=DOMAIN, update_interval=scan_interval) + super().__init__( + hass, + _LOGGER, + name=DOMAIN, + update_interval=scan_interval, + config_entry=config_entry, + ) async def _async_update_data(self): """Update data via library."""