Fix old lights with color temperature but no white support (#86)

ESPHome never supported this, and no built-in lights used this, but apparently it was used by third-party components. Without this fix, those lights would show up as on-off lights in HA. Make them RGBCT lights, which doesn't fit perfectly as they don't expect a white value, but they already got that anyway and it's better than being totally broken.
This commit is contained in:
Oxan van Leeuwen 2021-08-10 10:56:50 +02:00 committed by GitHub
parent 4357920245
commit 4a091b00a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -254,6 +254,7 @@ class LightInfo(EntityInfo):
(True, False, False, True): [LightColorMode.COLOR_TEMPERATURE],
(True, True, False, False): [LightColorMode.RGB],
(True, True, True, False): [LightColorMode.RGB_WHITE],
(True, True, False, True): [LightColorMode.RGB_COLOR_TEMPERATURE],
(True, True, True, True): [LightColorMode.RGB_COLOR_TEMPERATURE],
}