mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 16:17:20 +00:00
Explicitly pass in the config_entry in ws66i coordinator (#137865)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
d07c2b8226
commit
5ade026b87
@ -78,6 +78,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
# Create the coordinator for the WS66i
|
# Create the coordinator for the WS66i
|
||||||
coordinator: Ws66iDataUpdateCoordinator = Ws66iDataUpdateCoordinator(
|
coordinator: Ws66iDataUpdateCoordinator = Ws66iDataUpdateCoordinator(
|
||||||
hass,
|
hass,
|
||||||
|
entry,
|
||||||
ws66i,
|
ws66i,
|
||||||
zones,
|
zones,
|
||||||
)
|
)
|
||||||
|
@ -6,6 +6,7 @@ import logging
|
|||||||
|
|
||||||
from pyws66i import WS66i, ZoneStatus
|
from pyws66i import WS66i, ZoneStatus
|
||||||
|
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||||
|
|
||||||
@ -17,9 +18,12 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
class Ws66iDataUpdateCoordinator(DataUpdateCoordinator[list[ZoneStatus]]):
|
class Ws66iDataUpdateCoordinator(DataUpdateCoordinator[list[ZoneStatus]]):
|
||||||
"""DataUpdateCoordinator to gather data for WS66i Zones."""
|
"""DataUpdateCoordinator to gather data for WS66i Zones."""
|
||||||
|
|
||||||
|
config_entry: ConfigEntry
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
my_api: WS66i,
|
my_api: WS66i,
|
||||||
zones: list[int],
|
zones: list[int],
|
||||||
) -> None:
|
) -> None:
|
||||||
@ -27,6 +31,7 @@ class Ws66iDataUpdateCoordinator(DataUpdateCoordinator[list[ZoneStatus]]):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name="WS66i",
|
name="WS66i",
|
||||||
update_interval=POLL_INTERVAL,
|
update_interval=POLL_INTERVAL,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user