mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Explicitly pass in the config_entry in sonarr coordinator (#137938)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
e4ec217cfa
commit
60a3dbae41
@ -67,13 +67,19 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
)
|
||||
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
|
||||
coordinators: dict[str, SonarrDataUpdateCoordinator[Any]] = {
|
||||
"upcoming": CalendarDataUpdateCoordinator(hass, host_configuration, sonarr),
|
||||
"commands": CommandsDataUpdateCoordinator(hass, host_configuration, sonarr),
|
||||
"diskspace": DiskSpaceDataUpdateCoordinator(hass, host_configuration, sonarr),
|
||||
"queue": QueueDataUpdateCoordinator(hass, host_configuration, sonarr),
|
||||
"series": SeriesDataUpdateCoordinator(hass, host_configuration, sonarr),
|
||||
"status": StatusDataUpdateCoordinator(hass, host_configuration, sonarr),
|
||||
"wanted": WantedDataUpdateCoordinator(hass, host_configuration, sonarr),
|
||||
"upcoming": CalendarDataUpdateCoordinator(
|
||||
hass, entry, host_configuration, sonarr
|
||||
),
|
||||
"commands": CommandsDataUpdateCoordinator(
|
||||
hass, entry, host_configuration, sonarr
|
||||
),
|
||||
"diskspace": DiskSpaceDataUpdateCoordinator(
|
||||
hass, entry, host_configuration, sonarr
|
||||
),
|
||||
"queue": QueueDataUpdateCoordinator(hass, entry, host_configuration, sonarr),
|
||||
"series": SeriesDataUpdateCoordinator(hass, entry, host_configuration, sonarr),
|
||||
"status": StatusDataUpdateCoordinator(hass, entry, host_configuration, sonarr),
|
||||
"wanted": WantedDataUpdateCoordinator(hass, entry, host_configuration, sonarr),
|
||||
}
|
||||
# Temporary, until we add diagnostic entities
|
||||
_version = None
|
||||
|
@ -48,6 +48,7 @@ class SonarrDataUpdateCoordinator(DataUpdateCoordinator[SonarrDataT]):
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
host_configuration: PyArrHostConfiguration,
|
||||
api_client: SonarrClient,
|
||||
) -> None:
|
||||
@ -55,6 +56,7 @@ class SonarrDataUpdateCoordinator(DataUpdateCoordinator[SonarrDataT]):
|
||||
super().__init__(
|
||||
hass=hass,
|
||||
logger=LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=timedelta(seconds=30),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user