mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Explicitly pass in the config_entry in squeezebox coordinator (#138105)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
eebe182001
commit
0d0e751700
@ -151,7 +151,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: SqueezeboxConfigEntry) -
|
||||
else:
|
||||
_LOGGER.debug("Adding new entity: %s", player)
|
||||
player_coordinator = SqueezeBoxPlayerUpdateCoordinator(
|
||||
hass, player, lms.uuid
|
||||
hass, entry, player, lms.uuid
|
||||
)
|
||||
known_players.append(player.player_id)
|
||||
async_dispatcher_send(
|
||||
|
@ -90,11 +90,20 @@ class LMSStatusDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
class SqueezeBoxPlayerUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
|
||||
"""Coordinator for Squeezebox players."""
|
||||
|
||||
def __init__(self, hass: HomeAssistant, player: Player, server_uuid: str) -> None:
|
||||
config_entry: SqueezeboxConfigEntry
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
config_entry: SqueezeboxConfigEntry,
|
||||
player: Player,
|
||||
server_uuid: str,
|
||||
) -> None:
|
||||
"""Initialize the coordinator."""
|
||||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=player.name,
|
||||
update_interval=timedelta(seconds=PLAYER_UPDATE_INTERVAL),
|
||||
always_update=True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user