Ver Fonte

feat(rgbcw_lightbulb_xld_cl002): add similar Ledvance RGB brick

From PR #5366 by @DawidSu
Same use of dps 51 instead of 25 for scene and 30 instead of 27 for music
Additional "Do not disturb control" copied from rgbcw_lightbulb when available
Product ID invalid in PR, so products commented
force: true on switch in PR does not make sense for a non-optional dp. This
directive is only known to work for specific sensors on smartplugs. Most likely
the real solution is to try a different protocol version.
Jason Rumney há 1 semana atrás
pai
commit
925157c55f

+ 20 - 0
custom_components/tuya_local/devices/rgbcw_lightbulb_xld_cl002.yaml

@@ -3,6 +3,9 @@ name: RGBCW lightbulb
 #   - id: UNKNOWN
 #     manufacturer: Xinled
 #     model: XLD-CL002
+#   - id: UNKNOWN
+#     manufacturer: Ledvance
+#     model: SMART+ WiFi Wide Brick RGB
 entities:
   - entity: light
     dps:
@@ -73,6 +76,23 @@ entities:
         range:
           min: 0
           max: 86400
+  - entity: switch
+    translation_key: do_not_disturb
+    hidden: unavailable
+    category: config
+    dps:
+      - id: 34
+        type: boolean
+        optional: true
+        name: switch
+      - id: 34
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: text
     translation_key: scene
     category: config