mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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))
|
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
|
||||||
coordinators: dict[str, SonarrDataUpdateCoordinator[Any]] = {
|
coordinators: dict[str, SonarrDataUpdateCoordinator[Any]] = {
|
||||||
"upcoming": CalendarDataUpdateCoordinator(hass, host_configuration, sonarr),
|
"upcoming": CalendarDataUpdateCoordinator(
|
||||||
"commands": CommandsDataUpdateCoordinator(hass, host_configuration, sonarr),
|
hass, entry, host_configuration, sonarr
|
||||||
"diskspace": DiskSpaceDataUpdateCoordinator(hass, host_configuration, sonarr),
|
),
|
||||||
"queue": QueueDataUpdateCoordinator(hass, host_configuration, sonarr),
|
"commands": CommandsDataUpdateCoordinator(
|
||||||
"series": SeriesDataUpdateCoordinator(hass, host_configuration, sonarr),
|
hass, entry, host_configuration, sonarr
|
||||||
"status": StatusDataUpdateCoordinator(hass, host_configuration, sonarr),
|
),
|
||||||
"wanted": WantedDataUpdateCoordinator(hass, 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
|
# Temporary, until we add diagnostic entities
|
||||||
_version = None
|
_version = None
|
||||||
|
@ -48,6 +48,7 @@ class SonarrDataUpdateCoordinator(DataUpdateCoordinator[SonarrDataT]):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
host_configuration: PyArrHostConfiguration,
|
host_configuration: PyArrHostConfiguration,
|
||||||
api_client: SonarrClient,
|
api_client: SonarrClient,
|
||||||
) -> None:
|
) -> None:
|
||||||
@ -55,6 +56,7 @@ class SonarrDataUpdateCoordinator(DataUpdateCoordinator[SonarrDataT]):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
hass=hass,
|
hass=hass,
|
||||||
logger=LOGGER,
|
logger=LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name=DOMAIN,
|
name=DOMAIN,
|
||||||
update_interval=timedelta(seconds=30),
|
update_interval=timedelta(seconds=30),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user