Migrate philips_js light to ColorMode (#70877)

This commit is contained in:
epenet 2022-04-27 14:23:31 +02:00 committed by GitHub
parent d999c110a5
commit b4cea96c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,11 +10,9 @@ from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_EFFECT,
ATTR_HS_COLOR,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_EFFECT,
ColorMode,
LightEntity,
LightEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
@ -152,9 +150,7 @@ class PhilipsTVLightEntity(
super().__init__(coordinator)
self._attr_supported_color_modes = {ColorMode.HS, ColorMode.ONOFF}
self._attr_supported_features = (
SUPPORT_EFFECT | SUPPORT_COLOR | SUPPORT_BRIGHTNESS
)
self._attr_supported_features = LightEntityFeature.EFFECT
self._attr_name = f"{coordinator.system['name']} Ambilight"
self._attr_unique_id = coordinator.unique_id
self._attr_icon = "mdi:television-ambient-light"