J. Nick Koston 2 gadi atpakaļ
vecāks
revīzija
8d2d785234
2 mainītis faili ar 20 papildinājumiem un 0 dzēšanām
  1. 5 0
      switchbot/devices/bulb.py
  2. 15 0
      switchbot/devices/light_strip.py

+ 5 - 0
switchbot/devices/bulb.py

@@ -63,6 +63,11 @@ class SwitchbotBulb(SwitchbotSequenceDevice):
         """Return the current color mode."""
         return ColorMode(self._get_adv_value("color_mode") or 0)
 
+    @property
+    def color_modes(self) -> set[ColorMode]:
+        """Return the supported color modes."""
+        return {ColorMode.RGB, ColorMode.COLOR_TEMP}
+
     @property
     def min_temp(self) -> int:
         """Return minimum color temp."""

+ 15 - 0
switchbot/devices/light_strip.py

@@ -50,6 +50,21 @@ class SwitchbotLightStrip(SwitchbotSequenceDevice):
         """Return the current brightness value."""
         return self._get_adv_value("brightness") or 0
 
+    @property
+    def color_modes(self) -> set[ColorMode]:
+        """Return the supported color modes."""
+        return {ColorMode.RGB}
+
+    @property
+    def min_temp(self) -> int:
+        """Return minimum color temp."""
+        return 0
+
+    @property
+    def max_temp(self) -> int:
+        """Return maximum color temp."""
+        return 0
+
     @property
     def color_mode(self) -> ColorMode:
         """Return the current color mode."""