Explicitly pass in the config_entry in nibe_heatpump coordinator (#138071)

explicitly pass in the config_entry in coordinator
This commit is contained in:
Michael 2025-02-09 16:31:37 +01:00 committed by GitHub
parent 2e496411a1
commit b7949dba44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -81,7 +81,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_stop)
)
coordinator = CoilCoordinator(hass, heatpump, connection)
coordinator = CoilCoordinator(hass, entry, heatpump, connection)
data = hass.data.setdefault(DOMAIN, {})
data[entry.entry_id] = coordinator

View File

@ -71,12 +71,17 @@ class CoilCoordinator(ContextCoordinator[dict[int, CoilData], int]):
def __init__(
self,
hass: HomeAssistant,
config_entry: ConfigEntry,
heatpump: HeatPump,
connection: Connection,
) -> None:
"""Initialize coordinator."""
super().__init__(
hass, LOGGER, name="Nibe Heat Pump", update_interval=timedelta(seconds=60)
hass,
LOGGER,
config_entry=config_entry,
name="Nibe Heat Pump",
update_interval=timedelta(seconds=60),
)
self.data = {}