mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Migrate philips_js light to ColorMode (#70877)
This commit is contained in:
parent
d999c110a5
commit
b4cea96c21
@ -10,11 +10,9 @@ from homeassistant.components.light import (
|
|||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
ATTR_EFFECT,
|
ATTR_EFFECT,
|
||||||
ATTR_HS_COLOR,
|
ATTR_HS_COLOR,
|
||||||
SUPPORT_BRIGHTNESS,
|
|
||||||
SUPPORT_COLOR,
|
|
||||||
SUPPORT_EFFECT,
|
|
||||||
ColorMode,
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
|
LightEntityFeature,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
@ -152,9 +150,7 @@ class PhilipsTVLightEntity(
|
|||||||
super().__init__(coordinator)
|
super().__init__(coordinator)
|
||||||
|
|
||||||
self._attr_supported_color_modes = {ColorMode.HS, ColorMode.ONOFF}
|
self._attr_supported_color_modes = {ColorMode.HS, ColorMode.ONOFF}
|
||||||
self._attr_supported_features = (
|
self._attr_supported_features = LightEntityFeature.EFFECT
|
||||||
SUPPORT_EFFECT | SUPPORT_COLOR | SUPPORT_BRIGHTNESS
|
|
||||||
)
|
|
||||||
self._attr_name = f"{coordinator.system['name']} Ambilight"
|
self._attr_name = f"{coordinator.system['name']} Ambilight"
|
||||||
self._attr_unique_id = coordinator.unique_id
|
self._attr_unique_id = coordinator.unique_id
|
||||||
self._attr_icon = "mdi:television-ambient-light"
|
self._attr_icon = "mdi:television-ambient-light"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user