mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Fix color mode in overkiz light (#70966)
This commit is contained in:
@@ -48,11 +48,12 @@ class OverkizLight(OverkizEntity, LightEntity):
|
|||||||
self._attr_supported_color_modes: set[ColorMode] = set()
|
self._attr_supported_color_modes: set[ColorMode] = set()
|
||||||
|
|
||||||
if self.executor.has_command(OverkizCommand.SET_RGB):
|
if self.executor.has_command(OverkizCommand.SET_RGB):
|
||||||
self._attr_supported_color_modes.add(ColorMode.RGB)
|
self._attr_color_mode = ColorMode.RGB
|
||||||
if self.executor.has_command(OverkizCommand.SET_INTENSITY):
|
elif self.executor.has_command(OverkizCommand.SET_INTENSITY):
|
||||||
self._attr_supported_color_modes.add(ColorMode.BRIGHTNESS)
|
self._attr_color_mode = ColorMode.BRIGHTNESS
|
||||||
if not self.supported_color_modes:
|
else:
|
||||||
self._attr_supported_color_modes = {ColorMode.ONOFF}
|
self._attr_color_mode = ColorMode.ONOFF
|
||||||
|
self._attr_supported_color_modes = {self._attr_color_mode}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self) -> bool:
|
def is_on(self) -> bool:
|
||||||
|
Reference in New Issue
Block a user