mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
New liffylights release improves device detection
Increase device polling to 30 seconds
This commit is contained in:
parent
e6a8746dba
commit
9caa4752a4
@ -28,7 +28,7 @@ from homeassistant.components.light import \
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
REQUIREMENTS = ['liffylights==0.9.3']
|
REQUIREMENTS = ['liffylights==0.9.4']
|
||||||
DEPENDENCIES = []
|
DEPENDENCIES = []
|
||||||
|
|
||||||
CONF_SERVER = "server" # server address configuration item
|
CONF_SERVER = "server" # server address configuration item
|
||||||
@ -76,6 +76,12 @@ class LIFX():
|
|||||||
power, hue, sat, bri, kel)
|
power, hue, sat, bri, kel)
|
||||||
self._devices.append(bulb)
|
self._devices.append(bulb)
|
||||||
self._add_devices_callback([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
|
# pylint: disable=too-many-arguments
|
||||||
def on_color(self, ipaddr, hue, sat, bri, kel):
|
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)
|
lifx_library = LIFX(add_devices_callback, server_addr, broadcast_addr)
|
||||||
|
|
||||||
# register our poll service
|
# 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()
|
lifx_library.probe()
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ blinkstick==1.1.7
|
|||||||
phue==0.8
|
phue==0.8
|
||||||
|
|
||||||
# homeassistant.components.light.lifx
|
# homeassistant.components.light.lifx
|
||||||
liffylights==0.9.3
|
liffylights==0.9.4
|
||||||
|
|
||||||
# homeassistant.components.light.limitlessled
|
# homeassistant.components.light.limitlessled
|
||||||
limitlessled==1.0.0
|
limitlessled==1.0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user