From bfe0d7f4f63bb9604f88c0c0992b45287fa29346 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Sun, 13 Aug 2017 17:13:57 +0200 Subject: [PATCH] Fix call to ha_send_commands * 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 19dcc10c545172..b25741207de61a 100755 --- a/homeassistant/components/remote/harmony.py +++ b/homeassistant/components/remote/harmony.py @@ -214,14 +214,15 @@ def send_command(self, command, **kwargs): 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."""