mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 14:24:03 +02:00
Merge pull request #149 from Oekn5w/fix/non-rgb-lights
Add xy and hs as alternative color modes to detect color capabilities
This commit is contained in:
commit
8c0634be2e
1 changed files with 8 additions and 0 deletions
|
|
@ -40,6 +40,8 @@ from homeassistant.components.light import (
|
|||
is_on,
|
||||
COLOR_MODE_RGB,
|
||||
COLOR_MODE_RGBW,
|
||||
COLOR_MODE_HS,
|
||||
COLOR_MODE_XY,
|
||||
COLOR_MODE_COLOR_TEMP,
|
||||
COLOR_MODE_BRIGHTNESS,
|
||||
ATTR_SUPPORTED_COLOR_MODES,
|
||||
|
|
@ -395,6 +397,12 @@ def _supported_features(hass: HomeAssistant, light: str):
|
|||
if COLOR_MODE_RGBW in supported_color_modes:
|
||||
supported.add("color")
|
||||
supported.add("brightness") # see above url
|
||||
if COLOR_MODE_XY in supported_color_modes:
|
||||
supported.add("color")
|
||||
supported.add("brightness") # see above url
|
||||
if COLOR_MODE_HS in supported_color_modes:
|
||||
supported.add("color")
|
||||
supported.add("brightness") # see above url
|
||||
if COLOR_MODE_COLOR_TEMP in supported_color_modes:
|
||||
supported.add("color_temp")
|
||||
supported.add("brightness") # see above url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue