Skip to content
Open
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
6 changes: 3 additions & 3 deletions custom_components/meross_cloud/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DiffuserLightEntityWrapper(MerossDevice, LightEntity):
_device: MerossOilDiffuserLightDevice
# For now, we assume OilDiffuserLight supports all the following features.
# From Meross API it is in fact impossible to determine which exact features are supported by the device.
_attr_supported_color_modes = {ColorMode.WHITE, ColorMode.RGB, ColorMode.COLOR_TEMP}
_attr_supported_color_modes = {ColorMode.BRIGHTNESS, ColorMode.RGB, ColorMode.COLOR_TEMP}

def __init__(self,
channel: int,
Expand Down Expand Up @@ -143,7 +143,7 @@ async def async_turn_on(self, **kwargs) -> None:
def supported_color_modes(self) -> set[ColorMode] | set[str] | None:
res = set()
if self._device.get_supports_luminance(channel=self._channel_id):
res.add(ColorMode.WHITE)
res.add(ColorMode.BRIGHTNESS)
if self._device.get_supports_rgb(channel=self._channel_id):
res.add(ColorMode.RGB)
if self._device.get_supports_temperature(channel=self._channel_id):
Expand Down Expand Up @@ -174,7 +174,7 @@ def color_mode(self) -> ColorMode | str | None:
if self._device.get_supports_rgb(channel=self._channel_id):
return ColorMode.RGB
elif self._device.get_supports_luminance(channel=self._channel_id):
return ColorMode.WHITE
return ColorMode.BRIGHTNESS
if self._device.get_supports_temperature(channel=self._channel_id):
return ColorMode.COLOR_TEMP
return ColorMode.ONOFF
Expand Down