mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix tradfri lights (#7212)
* Remove leftover use of slugify * The IKEA manufacturer key is now exactly as found in device info. * Fix bitwise addition of supported features
This commit is contained in:
parent
40f480c24e
commit
3f47bf6b77
@ -8,7 +8,6 @@ from homeassistant.components.light import \
|
|||||||
PLATFORM_SCHEMA as LIGHT_PLATFORM_SCHEMA
|
PLATFORM_SCHEMA as LIGHT_PLATFORM_SCHEMA
|
||||||
from homeassistant.components.tradfri import KEY_GATEWAY
|
from homeassistant.components.tradfri import KEY_GATEWAY
|
||||||
from homeassistant.util import color as color_util
|
from homeassistant.util import color as color_util
|
||||||
from homeassistant.util import slugify
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -48,12 +47,12 @@ class Tradfri(Light):
|
|||||||
|
|
||||||
if self._light_data.hex_color is not None:
|
if self._light_data.hex_color is not None:
|
||||||
if self._light.device_info.manufacturer == IKEA:
|
if self._light.device_info.manufacturer == IKEA:
|
||||||
self._features &= SUPPORT_COLOR_TEMP
|
self._features |= SUPPORT_COLOR_TEMP
|
||||||
else:
|
else:
|
||||||
self._features &= SUPPORT_RGB_COLOR
|
self._features |= SUPPORT_RGB_COLOR
|
||||||
|
|
||||||
self._ok_temps = ALLOWED_TEMPERATURES.get(
|
self._ok_temps = ALLOWED_TEMPERATURES.get(
|
||||||
slugify(self._light.device_info.manufacturer))
|
self._light.device_info.manufacturer)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self):
|
def supported_features(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user