From 7c9d30eb067f6d7ae9b0315f7d77ed5e01e5a1d7 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Sun, 9 Feb 2025 21:14:19 +0100 Subject: [PATCH] Explicitly pass in the config_entry in intellifire coordinator (#138143) explicitly pass in the config_entry in coordinator --- homeassistant/components/intellifire/__init__.py | 4 +--- homeassistant/components/intellifire/coordinator.py | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/intellifire/__init__.py b/homeassistant/components/intellifire/__init__.py index ce78f1a6fa3..cda30820a2f 100644 --- a/homeassistant/components/intellifire/__init__.py +++ b/homeassistant/components/intellifire/__init__.py @@ -128,9 +128,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ) from err # Construct coordinator - data_update_coordinator = IntellifireDataUpdateCoordinator( - hass=hass, fireplace=fireplace - ) + data_update_coordinator = IntellifireDataUpdateCoordinator(hass, entry, fireplace) LOGGER.debug("Fireplace to Initialized - Awaiting first refresh") await data_update_coordinator.async_config_entry_first_refresh() diff --git a/homeassistant/components/intellifire/coordinator.py b/homeassistant/components/intellifire/coordinator.py index b4f03f4b5c8..6a23e7438db 100644 --- a/homeassistant/components/intellifire/coordinator.py +++ b/homeassistant/components/intellifire/coordinator.py @@ -9,6 +9,7 @@ from intellifire4py.control import IntelliFireController from intellifire4py.model import IntelliFirePollData from intellifire4py.read import IntelliFireDataProvider +from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.update_coordinator import DataUpdateCoordinator @@ -19,15 +20,19 @@ from .const import DOMAIN, LOGGER class IntellifireDataUpdateCoordinator(DataUpdateCoordinator[IntelliFirePollData]): """Class to manage the polling of the fireplace API.""" + config_entry: ConfigEntry + def __init__( self, hass: HomeAssistant, + config_entry: ConfigEntry, fireplace: UnifiedFireplace, ) -> None: """Initialize the Coordinator.""" super().__init__( hass, LOGGER, + config_entry=config_entry, name=DOMAIN, update_interval=timedelta(seconds=15), )