Przeglądaj źródła

feat(dreamlight_rgb_strip): add compatible JSK-P22 model

Make number of pixels config optional, as this appears to be missing from this light

Issue #4938
Jason Rumney 2 miesięcy temu
rodzic
commit
cd1cbf865a

+ 11 - 4
custom_components/tuya_local/devices/dreamlight_rgb_strip.yaml

@@ -3,6 +3,8 @@ products:
   - id: hq8xrxjmheit80cs
     manufacturer: Outsmart
     model: RGBIC LED
+  - id: kmgfxv1zmklfpxxn
+    model: JSK-P22
 entities:
   - entity: light
     dps:
@@ -63,6 +65,7 @@ entities:
   - entity: number
     name: Pixels
     category: config
+    hidden: unavailable
     icon: "mdi:dots-grid"
     dps:
       - id: 53
@@ -72,6 +75,14 @@ entities:
         range:
           min: 1
           max: 1000
+      - id: 53
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: select
     translation_key: scene
     category: config
@@ -179,10 +190,6 @@ entities:
         type: hex
         optional: true
         name: value
-      - id: 51
-        name: dreamlight_scene
-        type: string
-        optional: true
   - entity: text
     translation_key: scene
     category: config