Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions homeassistant/components/home_connect/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
COLOR_MODE_BRIGHTNESS,
COLOR_MODE_HS,
LightEntity,
)
from homeassistant.config_entries import ConfigEntry
Expand Down Expand Up @@ -68,11 +68,15 @@ def __init__(self, device, desc, ambient):
self._key = BSH_AMBIENT_LIGHT_ENABLED
self._custom_color_key = BSH_AMBIENT_LIGHT_CUSTOM_COLOR
self._color_key = BSH_AMBIENT_LIGHT_COLOR
self._attr_color_mode = COLOR_MODE_HS
self._attr_supported_color_modes = {COLOR_MODE_HS}
else:
self._brightness_key = COOKING_LIGHTING_BRIGHTNESS
self._key = COOKING_LIGHTING
self._custom_color_key = None
self._color_key = None
self._attr_color_mode = COLOR_MODE_BRIGHTNESS
self._attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}

@property
def is_on(self):
Expand All @@ -89,13 +93,6 @@ def hs_color(self):
"""Return the color property."""
return self._hs_color

@property
def supported_features(self):
"""Flag supported features."""
if self._ambient:
return SUPPORT_BRIGHTNESS | SUPPORT_COLOR
return SUPPORT_BRIGHTNESS

async def async_turn_on(self, **kwargs):
"""Switch the light on, change brightness, change color."""
if self._ambient:
Expand Down