mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +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
|
||||
coordinator: Ws66iDataUpdateCoordinator = Ws66iDataUpdateCoordinator(
|
||||
hass,
|
||||
entry,
|
||||
ws66i,
|
||||
zones,
|
||||
)
|
||||
|
@ -6,6 +6,7 @@ import logging
|
||||
|
||||
from pyws66i import WS66i, ZoneStatus
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||
|
||||
@ -17,9 +18,12 @@ _LOGGER = logging.getLogger(__name__)
|
||||
class Ws66iDataUpdateCoordinator(DataUpdateCoordinator[list[ZoneStatus]]):
|
||||
"""DataUpdateCoordinator to gather data for WS66i Zones."""
|
||||
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
my_api: WS66i,
|
||||
zones: list[int],
|
||||
) -> None:
|
||||
@ -27,6 +31,7 @@ class Ws66iDataUpdateCoordinator(DataUpdateCoordinator[list[ZoneStatus]]):
|
||||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=config_entry,
|
||||
name="WS66i",
|
||||
update_interval=POLL_INTERVAL,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user