From 86e44fc1cf22c20a579e623fd234a943a8205fbb Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Sat, 8 Feb 2025 13:15:24 +0100 Subject: [PATCH] Explicitly pass in the config_entry in govee_light_local coordinator (#137843) explicitly pass in the config_entry in coordinator --- homeassistant/components/govee_light_local/__init__.py | 2 +- homeassistant/components/govee_light_local/coordinator.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/govee_light_local/__init__.py b/homeassistant/components/govee_light_local/__init__.py index 44dbc825665..ee04dd81088 100644 --- a/homeassistant/components/govee_light_local/__init__.py +++ b/homeassistant/components/govee_light_local/__init__.py @@ -23,7 +23,7 @@ _LOGGER = logging.getLogger(__name__) async def async_setup_entry(hass: HomeAssistant, entry: GoveeLocalConfigEntry) -> bool: """Set up Govee light local from a config entry.""" - coordinator = GoveeLocalApiCoordinator(hass=hass) + coordinator = GoveeLocalApiCoordinator(hass, entry) async def await_cleanup(): cleanup_complete: asyncio.Event = coordinator.cleanup() diff --git a/homeassistant/components/govee_light_local/coordinator.py b/homeassistant/components/govee_light_local/coordinator.py index 240313a34b8..ecbed0c4f65 100644 --- a/homeassistant/components/govee_light_local/coordinator.py +++ b/homeassistant/components/govee_light_local/coordinator.py @@ -26,11 +26,16 @@ type GoveeLocalConfigEntry = ConfigEntry[GoveeLocalApiCoordinator] class GoveeLocalApiCoordinator(DataUpdateCoordinator[list[GoveeDevice]]): """Govee light local coordinator.""" - def __init__(self, hass: HomeAssistant) -> None: + config_entry: GoveeLocalConfigEntry + + def __init__( + self, hass: HomeAssistant, config_entry: GoveeLocalConfigEntry + ) -> None: """Initialize my coordinator.""" super().__init__( hass=hass, logger=_LOGGER, + config_entry=config_entry, name="GoveeLightLocalApi", update_interval=SCAN_INTERVAL, )