From 8f1415ec776be7ebb93b82fc633e5ad11b24c734 Mon Sep 17 00:00:00 2001 From: Martin Bauer Date: Fri, 17 Jan 2020 22:37:39 +0100 Subject: [PATCH] Squeezebox: fix for method call service --- custom_components/squeezebox_telnet/media_player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/squeezebox_telnet/media_player.py b/custom_components/squeezebox_telnet/media_player.py index b02c311..3749dcb 100644 --- a/custom_components/squeezebox_telnet/media_player.py +++ b/custom_components/squeezebox_telnet/media_player.py @@ -124,9 +124,9 @@ async def async_setup_platform(hass, config, async_add_entities, update_tasks = [] 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)) - if update_tasks: await asyncio.wait(update_tasks)