Squeezebox: fix for method call service
This commit is contained in:
parent
1a710aa7ce
commit
8f1415ec77
|
@ -124,9 +124,9 @@ async def async_setup_platform(hass, config, async_add_entities,
|
||||||
|
|
||||||
update_tasks = []
|
update_tasks = []
|
||||||
for player in target_players:
|
for player in target_players:
|
||||||
await getattr(player, method['method'])(**params)
|
command = service.data.get('command').split()
|
||||||
|
player.call_method(*command)
|
||||||
update_tasks.append(player.async_update_ha_state(True))
|
update_tasks.append(player.async_update_ha_state(True))
|
||||||
|
|
||||||
if update_tasks:
|
if update_tasks:
|
||||||
await asyncio.wait(update_tasks)
|
await asyncio.wait(update_tasks)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue