Browse Source

feat(rgbcw_lightbulb): add local product id for LSC GU10

Issue #5668

- add "remote_switch" on dp 41 as alternative for do_not_disturb on dp 34,
it appears to have the same function (disable control via WiFi)
Jason Rumney 5 ngày trước cách đây
mục cha
commit
7745821972
1 tập tin đã thay đổi với 21 bổ sung4 xóa
  1. 21 4
      custom_components/tuya_local/devices/rgbcw_lightbulb.yaml

+ 21 - 4
custom_components/tuya_local/devices/rgbcw_lightbulb.yaml

@@ -55,6 +55,9 @@ products:
     model: RGBCW smart bulb
   - id: keyj979nf3q3theh
     model: GU10 lightbulb
+  - id: keytg5kq8gvkv9dh
+    manufacturer: LSC Smart Connect
+    model: GU10 White and Color Ambiance
 entities:
   - entity: light
     dps:
@@ -80,9 +83,6 @@ entities:
         range:
           min: 10
           max: 1000
-        mapping:
-          - dps_val: null
-            value: 0
       - id: 23
         name: color_temp
         type: integer
@@ -134,14 +134,31 @@ entities:
         type: boolean
         optional: true
         name: switch
+        mapping:
+          - dps_val: null
+            value_redirect: remote_sw
       - id: 34
         type: boolean
         optional: true
         name: available
         mapping:
           - dps_val: null
-            value: false
+            value: true
+            constraint: remote_sw
+            conditions:
+              - dps_val: null
+                value: false
           - value: true
+      # Remote switch has same function but reversed logic
+      - id: 41
+        type: boolean
+        optional: true
+        name: remote_sw
+        mapping:
+          - dps_val: false
+            value: true
+          - dps_val: true
+            value: false
   - entity: text
     translation_key: scene
     category: config