mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Explicitly pass in the config_entry in nibe_heatpump coordinator (#138071)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
2e496411a1
commit
b7949dba44
@ -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
|
||||
|
@ -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 = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user