forked from home-assistant/core
Fix Radarr health check singularity (#109762)
* Fix Radarr health check singularity * Fix comment
This commit is contained in:
committed by
Franck Nijhof
parent
9fcdfd1b16
commit
ffd5e04a29
@@ -96,7 +96,7 @@ class DiskSpaceDataUpdateCoordinator(RadarrDataUpdateCoordinator[list[RootFolder
|
|||||||
"""Fetch the data."""
|
"""Fetch the data."""
|
||||||
root_folders = await self.api_client.async_get_root_folders()
|
root_folders = await self.api_client.async_get_root_folders()
|
||||||
if isinstance(root_folders, RootFolder):
|
if isinstance(root_folders, RootFolder):
|
||||||
root_folders = [root_folders]
|
return [root_folders]
|
||||||
return root_folders
|
return root_folders
|
||||||
|
|
||||||
|
|
||||||
@@ -105,7 +105,10 @@ class HealthDataUpdateCoordinator(RadarrDataUpdateCoordinator[list[Health]]):
|
|||||||
|
|
||||||
async def _fetch_data(self) -> list[Health]:
|
async def _fetch_data(self) -> list[Health]:
|
||||||
"""Fetch the health data."""
|
"""Fetch the health data."""
|
||||||
return await self.api_client.async_get_failed_health_checks()
|
health = await self.api_client.async_get_failed_health_checks()
|
||||||
|
if isinstance(health, Health):
|
||||||
|
return [health]
|
||||||
|
return health
|
||||||
|
|
||||||
|
|
||||||
class MoviesDataUpdateCoordinator(RadarrDataUpdateCoordinator[int]):
|
class MoviesDataUpdateCoordinator(RadarrDataUpdateCoordinator[int]):
|
||||||
|
Reference in New Issue
Block a user