From 9caa4752a43283547d4891ee501555b65074fbe8 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 1 Feb 2016 18:29:43 +0000 Subject: [PATCH 1/3] New liffylights release improves device detection Increase device polling to 30 seconds --- homeassistant/components/light/lifx.py | 10 ++++++++-- requirements_all.txt | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/light/lifx.py b/homeassistant/components/light/lifx.py index cb7e8cbf647..2e9bb56fa65 100644 --- a/homeassistant/components/light/lifx.py +++ b/homeassistant/components/light/lifx.py @@ -28,7 +28,7 @@ from homeassistant.components.light import \ _LOGGER = logging.getLogger(__name__) -REQUIREMENTS = ['liffylights==0.9.3'] +REQUIREMENTS = ['liffylights==0.9.4'] DEPENDENCIES = [] CONF_SERVER = "server" # server address configuration item @@ -76,6 +76,12 @@ class LIFX(): power, hue, sat, bri, kel) self._devices.append(bulb) self._add_devices_callback([bulb]) + else: + _LOGGER.debug("update bulb %s %s %d %d %d %d %d", + ipaddr, name, power, hue, sat, bri, kel) + bulb.set_power(power) + bulb.set_color(hue, sat, bri, kel) + bulb.update_ha_state() # pylint: disable=too-many-arguments def on_color(self, ipaddr, hue, sat, bri, kel): @@ -109,7 +115,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): lifx_library = LIFX(add_devices_callback, server_addr, broadcast_addr) # register our poll service - track_time_change(hass, lifx_library.poll, second=10) + track_time_change(hass, lifx_library.poll, second=[10,40]) lifx_library.probe() diff --git a/requirements_all.txt b/requirements_all.txt index 8b2607f3e97..e6ef472e8e5 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -52,7 +52,7 @@ blinkstick==1.1.7 phue==0.8 # homeassistant.components.light.lifx -liffylights==0.9.3 +liffylights==0.9.4 # homeassistant.components.light.limitlessled limitlessled==1.0.0 From 031e7a4013eef14aea50fdcf0bb9ba7a8ef3af3d Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 1 Feb 2016 18:29:43 +0000 Subject: [PATCH 2/3] New liffylights release improves device detection Increase device polling to 30 seconds --- homeassistant/components/light/lifx.py | 10 ++++++++-- requirements_all.txt | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/light/lifx.py b/homeassistant/components/light/lifx.py index 4979c1dc2d6..81466dd601c 100644 --- a/homeassistant/components/light/lifx.py +++ b/homeassistant/components/light/lifx.py @@ -16,7 +16,7 @@ from homeassistant.components.light import \ _LOGGER = logging.getLogger(__name__) -REQUIREMENTS = ['liffylights==0.9.3'] +REQUIREMENTS = ['liffylights==0.9.4'] DEPENDENCIES = [] CONF_SERVER = "server" # server address configuration item @@ -64,6 +64,12 @@ class LIFX(): power, hue, sat, bri, kel) self._devices.append(bulb) self._add_devices_callback([bulb]) + else: + _LOGGER.debug("update bulb %s %s %d %d %d %d %d", + ipaddr, name, power, hue, sat, bri, kel) + bulb.set_power(power) + bulb.set_color(hue, sat, bri, kel) + bulb.update_ha_state() # pylint: disable=too-many-arguments def on_color(self, ipaddr, hue, sat, bri, kel): @@ -97,7 +103,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): lifx_library = LIFX(add_devices_callback, server_addr, broadcast_addr) # register our poll service - track_time_change(hass, lifx_library.poll, second=10) + track_time_change(hass, lifx_library.poll, second=[10,40]) lifx_library.probe() diff --git a/requirements_all.txt b/requirements_all.txt index 704857206e9..8435ffd01d5 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -100,7 +100,7 @@ insteon_hub==0.4.5 jsonrpc-requests==0.1 # homeassistant.components.light.lifx -liffylights==0.9.3 +liffylights==0.9.4 # homeassistant.components.light.limitlessled limitlessled==1.0.0 From 08ab7dba2ca2d440a3e54deb92a69cfd31f7ad14 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 2 Feb 2016 00:21:15 +0000 Subject: [PATCH 3/3] Fix whitespace --- homeassistant/components/light/lifx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/light/lifx.py b/homeassistant/components/light/lifx.py index 81466dd601c..63c5e923ea6 100644 --- a/homeassistant/components/light/lifx.py +++ b/homeassistant/components/light/lifx.py @@ -103,7 +103,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): lifx_library = LIFX(add_devices_callback, server_addr, broadcast_addr) # register our poll service - track_time_change(hass, lifx_library.poll, second=[10,40]) + track_time_change(hass, lifx_library.poll, second=[10, 40]) lifx_library.probe()