mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +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
|
raise ConfigEntryNotReady(f"Unable to connect to Skybell service: {ex}") from ex
|
||||||
|
|
||||||
device_coordinators: list[SkybellDataUpdateCoordinator] = [
|
device_coordinators: list[SkybellDataUpdateCoordinator] = [
|
||||||
SkybellDataUpdateCoordinator(hass, device) for device in devices
|
SkybellDataUpdateCoordinator(hass, entry, device) for device in devices
|
||||||
]
|
]
|
||||||
await asyncio.gather(
|
await asyncio.gather(
|
||||||
*[
|
*[
|
||||||
|
@ -16,11 +16,14 @@ class SkybellDataUpdateCoordinator(DataUpdateCoordinator[None]):
|
|||||||
|
|
||||||
config_entry: ConfigEntry
|
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."""
|
"""Initialize the coordinator."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass=hass,
|
hass=hass,
|
||||||
logger=LOGGER,
|
logger=LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name=device.name,
|
name=device.name,
|
||||||
update_interval=timedelta(seconds=30),
|
update_interval=timedelta(seconds=30),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user