|
|
@@ -68,16 +68,16 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
def supported_color_modes(self):
|
|
|
"""Return the supported color modes for this light."""
|
|
|
if self._color_mode_dps:
|
|
|
- return [
|
|
|
+ return {
|
|
|
ColorMode(mode)
|
|
|
for mode in self._color_mode_dps.values(self._device)
|
|
|
if mode and hasattr(ColorMode, mode.upper())
|
|
|
- ]
|
|
|
+ }
|
|
|
else:
|
|
|
try:
|
|
|
mode = ColorMode(self.color_mode)
|
|
|
if mode and mode != ColorMode.UNKNOWN:
|
|
|
- return [mode]
|
|
|
+ return {mode}
|
|
|
except ValueError:
|
|
|
_LOGGER.warning(
|
|
|
"%s/%s: Unrecognised color mode %s ignored",
|
|
|
@@ -85,7 +85,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
self.name or "light",
|
|
|
self.color_mode,
|
|
|
)
|
|
|
- return []
|
|
|
+ return set()
|
|
|
|
|
|
@property
|
|
|
def supported_features(self):
|