hass-core/homeassistant/components/light
Anders Melchiorsen fee89d8d16 LIFX: avoid rare NoneType errors ()
* Get full multizone state during registration

We used to rely on the periodic update to get the state of each zone, only
establishing the number of zones during registration. This resulted in errors
if the current state was needed for a partial color change before the first
async_update happened.

Now we do a full update before adding the light. Thus async_update can no
longer assume device.color_zones to be defined and must instead use the
response message to decide the total number of zones.

* Insist on getting the initial state

If a response to the initial state query is lost we used to just carry on.
This resulted in type errors when we next tried to access the undefined state.

After this commit the light is not added before we have the full state.

This scenario mostly happens when something is misbehaving and the type errors
were actually useful in figuring out what happend. So an error message is
logged in their place.

* Remove lint
2017-08-20 20:29:54 +02:00
..
__init__.py Add bind_hass to components () 2017-07-16 10:14:46 -07:00
avion.py Update avion.py () 2017-07-06 23:20:39 -07:00
blinksticklight.py Update docstrings and log messages () 2017-05-10 12:06:57 +02:00
blinkt.py Do not install all dependencies in dev mode () 2017-05-11 19:20:23 -07:00
decora.py Decora: Fix set brightness and improve reconnection () 2017-07-19 00:02:42 +02:00
decora_wifi.py Fix - Decora Wi-Fi Switch unable to set brightness () 2017-08-15 16:12:16 +02:00
demo.py Update docstrings () 2017-05-02 09:18:47 -07:00
enocean.py Update docstrings and log messages () 2017-05-10 12:06:57 +02:00
flux_led.py flux_led: support for property "available" () 2017-08-01 21:26:27 -07:00
homematic.py Fix some issues for PyLint 1.7.2 () 2017-07-05 20:02:16 -07:00
hue.py Add support for Automatic OAuth2 authentication () 2017-08-13 22:37:50 -07:00
hyperion.py Do not overwrite a custom hyperion light name with the hostname of the server. () 2017-07-10 00:06:31 +02:00
insteon_local.py Add support for Automatic OAuth2 authentication () 2017-08-13 22:37:50 -07:00
insteon_plm.py Update docstrings and log messages () 2017-05-10 12:06:57 +02:00
isy994.py Change Error Message when Turning off ISY994 Light () 2017-06-21 09:38:12 +02:00
knx.py Implement KNX dimming functionality () 2017-07-06 22:24:25 -07:00
lifx.py LIFX: avoid rare NoneType errors () 2017-08-20 20:29:54 +02:00
lifx_legacy.py Updated docstrings () 2017-04-30 20:10:08 -07:00
light_profiles.csv Lights now support profiles 2014-03-26 00:20:02 -07:00
limitlessled.py LimitlessLED: Configurable fade-out behavior () 2017-06-21 22:22:24 -07:00
litejet.py Do not call update() in constructor () 2017-08-08 20:21:33 +02:00
lutron.py Add configuration check and use default var names () 2017-06-09 00:21:06 +02:00
lutron_caseta.py Update docstrings () 2017-05-02 09:18:47 -07:00
mochad.py Add mochad light component () 2017-08-03 10:51:01 +02:00
mqtt.py Update docstrings () 2017-05-02 09:18:47 -07:00
mqtt_json.py Update docstrings () 2017-05-02 09:18:47 -07:00
mqtt_template.py Update docstrings () 2017-05-02 09:18:47 -07:00
mysensors.py Update docstrings () 2017-05-02 09:18:47 -07:00
mystrom.py Add effects () 2017-07-11 21:22:00 +02:00
osramlightify.py use updated osram lightify 1.0.6 component, including bugfix allowing more than 27 devices () 2017-08-01 20:36:31 +02:00
piglow.py light.piglow update () 2017-05-02 21:21:37 -07:00
qwikswitch.py Update docstrings () 2017-05-02 09:18:47 -07:00
rflink.py Correct spelling of aliases, deprecate old config options. () 2017-07-06 15:59:54 +02:00
rfxtrx.py Add hass to rfxtrx object () 2017-05-04 23:50:53 -07:00
rpi_gpio_pwm.py Update pwmled to 1.2.1. () 2017-08-19 13:23:46 +02:00
scsgate.py Update docstrings () 2017-05-02 09:18:47 -07:00
sensehat.py light.sensehat: brightness control logic update () 2017-05-02 17:02:13 -07:00
services.yaml LIFX: support for multizone () 2017-07-13 19:38:36 -07:00
tellduslive.py Update docstrings () 2017-05-02 09:18:47 -07:00
tellstick.py Fix pylint 1.7.2 no-else-return issues () 2017-07-05 23:30:01 -07:00
template.py fixing potential null issue with optional param being parsed as a script () 2017-06-11 22:58:20 -07:00
tikteck.py Update docstrings () 2017-05-02 09:18:47 -07:00
tplink.py Fix brightness issue . () 2017-07-31 09:02:04 -07:00
tradfri.py Fix tradfri error spam () 2017-07-31 08:58:47 -07:00
velbus.py Velbus () 2017-07-26 14:03:29 +02:00
vera.py Fix pylint 1.7.2 no-else-return issues () 2017-07-05 23:30:01 -07:00
wemo.py Update docstrings () 2017-05-02 09:18:47 -07:00
wink.py Support for Wink Switch and Light groups also fix fan speed selection () 2017-07-20 00:27:39 +02:00
x10.py Update docstrings () 2017-05-02 09:18:47 -07:00
xiaomi.py Xiaomi gw support () 2017-07-20 15:20:00 +02:00
yeelight.py Block dependencies that depend on enum34 () 2017-08-04 23:06:10 -07:00
yeelightsunflower.py Update docstrings () 2017-05-02 09:18:47 -07:00
zengge.py Do not call update() in constructor () 2017-08-08 20:21:33 +02:00
zha.py Add transition support to light.zha () 2017-07-26 17:22:31 +02:00
zigbee.py 0.28 () 2016-09-10 18:22:58 -07:00
zwave.py Fix pylint 1.7.2 no-else-return issues () 2017-07-05 23:30:01 -07:00