mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Explicitly pass in the config_entry in skybell coordinator (#137947)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
e698e436d6
commit
cfb062a5a4
@ -45,7 +45,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
raise ConfigEntryNotReady(f"Unable to connect to Skybell service: {ex}") from ex
|
||||
|
||||
device_coordinators: list[SkybellDataUpdateCoordinator] = [
|
||||
SkybellDataUpdateCoordinator(hass, device) for device in devices
|
||||
SkybellDataUpdateCoordinator(hass, entry, device) for device in devices
|
||||
]
|
||||
await asyncio.gather(
|
||||
*[
|
||||
|
@ -16,11 +16,14 @@ class SkybellDataUpdateCoordinator(DataUpdateCoordinator[None]):
|
||||
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(self, hass: HomeAssistant, device: SkybellDevice) -> None:
|
||||
def __init__(
|
||||
self, hass: HomeAssistant, config_entry: ConfigEntry, device: SkybellDevice
|
||||
) -> None:
|
||||
"""Initialize the coordinator."""
|
||||
super().__init__(
|
||||
hass=hass,
|
||||
logger=LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=device.name,
|
||||
update_interval=timedelta(seconds=30),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user