From ab807702521c30a66c0120ccb16687efd1e05b25 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Wed, 5 Feb 2025 21:57:15 +0100 Subject: [PATCH] Explicitly pass in the config_entry in screenlogic coordinator init (#137463) explicitly pass in the config_entry in coordinator init --- homeassistant/components/screenlogic/coordinator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/screenlogic/coordinator.py b/homeassistant/components/screenlogic/coordinator.py index a90c9cb2cf4..b3c438dc641 100644 --- a/homeassistant/components/screenlogic/coordinator.py +++ b/homeassistant/components/screenlogic/coordinator.py @@ -52,6 +52,8 @@ async def async_get_connect_info( class ScreenlogicDataUpdateCoordinator(DataUpdateCoordinator[None]): """Class to manage the data update for the Screenlogic component.""" + config_entry: ConfigEntry + def __init__( self, hass: HomeAssistant, @@ -60,7 +62,6 @@ class ScreenlogicDataUpdateCoordinator(DataUpdateCoordinator[None]): gateway: ScreenLogicGateway, ) -> None: """Initialize the Screenlogic Data Update Coordinator.""" - self.config_entry = config_entry self.gateway = gateway interval = timedelta( @@ -69,6 +70,7 @@ class ScreenlogicDataUpdateCoordinator(DataUpdateCoordinator[None]): super().__init__( hass, _LOGGER, + config_entry=config_entry, name=DOMAIN, update_interval=interval, # Debounced option since the device takes @@ -91,7 +93,6 @@ class ScreenlogicDataUpdateCoordinator(DataUpdateCoordinator[None]): async def _async_update_data(self) -> None: """Fetch data from the Screenlogic gateway.""" - assert self.config_entry is not None try: if not self.gateway.is_connected: connect_info = await async_get_connect_info(