* Fix #6534

Makes sure 0 is not passes to `color_temperature_kelvin_to_mired`.

* Update osramlightify.py

* Update osramlightify.py
This commit is contained in:
deisi 2017-03-16 06:58:06 +01:00 committed by Paulus Schoutsen
parent 9ef084d903
commit 5b3dc7f2a5

View file

@ -215,5 +215,8 @@ class OsramLightifyLight(Light):
self._name = self._light.name()
self._rgb = self._light.rgb()
o_temp = self._light.temp()
self._temperature = color_temperature_kelvin_to_mired(o_temp)
if o_temp == 0:
self._temperature = None
else:
self._temperature = color_temperature_kelvin_to_mired(o_temp)
self._state = self._light.on()