Explicitly pass in the config_entry in skybell coordinator (#137947)

explicitly pass in the config_entry in coordinator
This commit is contained in:
Michael 2025-02-08 20:33:50 +01:00 committed by GitHub
parent e698e436d6
commit cfb062a5a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -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(
*[

View File

@ -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),
)