From cbe5225e04c9354fd9929a5a2dd94b677596bec4 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Sun, 13 Aug 2017 20:28:33 +0200 Subject: [PATCH] Fix call to ha_send_commands (#8956) * Name keyword arguments correctly according to dependency lib. * Only pass keyword arguments that are not None. --- homeassistant/components/remote/harmony.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/remote/harmony.py b/homeassistant/components/remote/harmony.py index 19dcc10c545..b25741207de 100755 --- a/homeassistant/components/remote/harmony.py +++ b/homeassistant/components/remote/harmony.py @@ -214,14 +214,15 @@ class HarmonyRemote(remote.RemoteDevice): if device is None: _LOGGER.error("Missing required argument: device") return + params = {} num_repeats = kwargs.pop(ATTR_NUM_REPEATS, None) if num_repeats is not None: - kwargs[ATTR_NUM_REPEATS] = num_repeats + params['repeat_num'] = num_repeats delay_secs = kwargs.pop(ATTR_DELAY_SECS, None) if delay_secs is not None: - kwargs[ATTR_DELAY_SECS] = delay_secs + params['delay_secs'] = delay_secs pyharmony.ha_send_commands( - self._token, self.host, self._port, device, command, **kwargs) + self._token, self.host, self._port, device, command, **params) def sync(self): """Sync the Harmony device with the web service."""