mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
Explicitly pass in the config_entry in pvoutput coordinator (#138033)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
552a5b1bb1
commit
7e2eef7079
@ -21,14 +21,15 @@ class PVOutputDataUpdateCoordinator(DataUpdateCoordinator[Status]):
|
|||||||
|
|
||||||
def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
|
def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
|
||||||
"""Initialize the PVOutput coordinator."""
|
"""Initialize the PVOutput coordinator."""
|
||||||
self.config_entry = entry
|
|
||||||
self.pvoutput = PVOutput(
|
self.pvoutput = PVOutput(
|
||||||
api_key=entry.data[CONF_API_KEY],
|
api_key=entry.data[CONF_API_KEY],
|
||||||
system_id=entry.data[CONF_SYSTEM_ID],
|
system_id=entry.data[CONF_SYSTEM_ID],
|
||||||
session=async_get_clientsession(hass),
|
session=async_get_clientsession(hass),
|
||||||
)
|
)
|
||||||
|
|
||||||
super().__init__(hass, LOGGER, name=DOMAIN, update_interval=SCAN_INTERVAL)
|
super().__init__(
|
||||||
|
hass, LOGGER, config_entry=entry, name=DOMAIN, update_interval=SCAN_INTERVAL
|
||||||
|
)
|
||||||
|
|
||||||
async def _async_update_data(self) -> Status:
|
async def _async_update_data(self) -> Status:
|
||||||
"""Fetch system status from PVOutput."""
|
"""Fetch system status from PVOutput."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user