mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Add type to coordinator for Squeezebox (#149087)
This commit is contained in:
parent
d266b6f6ab
commit
be644ca96e
@ -30,7 +30,7 @@ from .const import (
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class LMSStatusDataUpdateCoordinator(DataUpdateCoordinator):
|
class LMSStatusDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
|
||||||
"""LMS Status custom coordinator."""
|
"""LMS Status custom coordinator."""
|
||||||
|
|
||||||
config_entry: SqueezeboxConfigEntry
|
config_entry: SqueezeboxConfigEntry
|
||||||
@ -59,13 +59,13 @@ class LMSStatusDataUpdateCoordinator(DataUpdateCoordinator):
|
|||||||
else:
|
else:
|
||||||
_LOGGER.warning("Can't query server capabilities %s", self.lms.name)
|
_LOGGER.warning("Can't query server capabilities %s", self.lms.name)
|
||||||
|
|
||||||
async def _async_update_data(self) -> dict:
|
async def _async_update_data(self) -> dict[str, Any]:
|
||||||
"""Fetch data from LMS status call.
|
"""Fetch data from LMS status call.
|
||||||
|
|
||||||
Then we process only a subset to make then nice for HA
|
Then we process only a subset to make then nice for HA
|
||||||
"""
|
"""
|
||||||
async with timeout(STATUS_API_TIMEOUT):
|
async with timeout(STATUS_API_TIMEOUT):
|
||||||
data: dict | None = await self.lms.async_prepared_status()
|
data: dict[str, Any] | None = await self.lms.async_prepared_status()
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
raise UpdateFailed(
|
raise UpdateFailed(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user