mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57: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)
|
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 = hass.data.setdefault(DOMAIN, {})
|
||||||
data[entry.entry_id] = coordinator
|
data[entry.entry_id] = coordinator
|
||||||
|
@ -71,12 +71,17 @@ class CoilCoordinator(ContextCoordinator[dict[int, CoilData], int]):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
heatpump: HeatPump,
|
heatpump: HeatPump,
|
||||||
connection: Connection,
|
connection: Connection,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize coordinator."""
|
"""Initialize coordinator."""
|
||||||
super().__init__(
|
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 = {}
|
self.data = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user