Emulate color temperature for non-ct lights in light groups (#23495)

* Emulate color temperature for non-ct lights in light groups

* fix tests

* Address review comments

* Fix black formatting

* Fix for pylint

* Address comments

* Fix black formatting

* Address comments
This commit is contained in:
Bryan York authored and Martin Hjelmare committed 2019-09-15 20:53:05 +02:00
1 parent fd359c6222
commit f45f8f2f3d
3 files changed
+97 -3

No files matched your search

@@ -308,7 +308,7 @@ class ColorSettingTrait(_Trait):
if features & light.SUPPORT_COLOR_TEMP:
# Max Kelvin is Min Mireds K = 1000000 / mireds
# Min Kevin is Max Mireds K = 1000000 / mireds
# Min Kelvin is Max Mireds K = 1000000 / mireds
response["colorTemperatureRange"] = {
"temperatureMaxK": color_util.color_temperature_mired_to_kelvin(
attrs.get(light.ATTR_MIN_MIREDS)