Răsfoiți Sursa

feat: add RGBICWW Light Bars (W1163000) support (#540)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Onero-testdev 6 zile în urmă
părinte
comite
3e1ed8914f
3 a modificat fișierele cu 14 adăugiri și 0 ștergeri
  1. 12 0
      switchbot/adv_parser.py
  2. 1 0
      switchbot/const/__init__.py
  3. 1 0
      switchbot/devices/device.py

+ 12 - 0
switchbot/adv_parser.py

@@ -678,6 +678,18 @@ SUPPORTED_TYPES: dict[str | bytes, SwitchbotSupportedType] = {
         "func": process_rgbic_light,
         "manufacturer_id": 2409,
     },
+    b"\x00\x11\xbe\xf8": {
+        "modelName": SwitchbotModel.RGBICWW_LIGHT_BARS,
+        "modelFriendlyName": "RGBICWW Light Bars",
+        "func": process_rgbic_light,
+        "manufacturer_id": 2409,
+    },
+    b"\x01\x11\xbe\xf8": {
+        "modelName": SwitchbotModel.RGBICWW_LIGHT_BARS,
+        "modelFriendlyName": "RGBICWW Light Bars",
+        "func": process_rgbic_light,
+        "manufacturer_id": 2409,
+    },
     b"\x00\x11\xbb\x10": {
         "modelName": SwitchbotModel.RGBICWW_CEILING_LIGHT,
         "modelFriendlyName": "RGBICWW Ceiling Light",

+ 1 - 0
switchbot/const/__init__.py

@@ -107,6 +107,7 @@ class SwitchbotModel(StrEnum):
     PLUG_MINI_EU = "Plug Mini (EU)"
     RGBICWW_STRIP_LIGHT = "RGBICWW Strip Light"
     RGBICWW_FLOOR_LAMP = "RGBICWW Floor Lamp"
+    RGBICWW_LIGHT_BARS = "RGBICWW Light Bars"
     RGBICWW_CEILING_LIGHT = "RGBICWW Ceiling Light"
     PERMANENT_OUTDOOR_LIGHT = "Permanent Outdoor Light"
     RGBIC_NEON_ROPE_LIGHT = "RGBIC Neon Rope Light"

+ 1 - 0
switchbot/devices/device.py

@@ -102,6 +102,7 @@ API_MODEL_TO_ENUM: dict[str, SwitchbotModel] = {
     "W1102001": SwitchbotModel.STRIP_LIGHT_3,
     "W1102003": SwitchbotModel.RGBICWW_STRIP_LIGHT,
     "W1102004": SwitchbotModel.RGBICWW_FLOOR_LAMP,
+    "W1163000": SwitchbotModel.RGBICWW_LIGHT_BARS,
     "W1162000": SwitchbotModel.RGBICWW_CEILING_LIGHT,
     "W1104000": SwitchbotModel.PLUG_MINI_EU,
     "W1128000": SwitchbotModel.SMART_THERMOSTAT_RADIATOR,