Explorar el Código

Add support for "Dreamlight" RGBCW LED strips.

Issue #1341
Jason Rumney hace 2 años
padre
commit
e52081b94a
Se han modificado 3 ficheros con 117 adiciones y 0 borrados
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 115 0
      custom_components/tuya_local/devices/dreamlight_led_strip.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -440,3 +440,4 @@ Further device support has been made with the assistance of users. Please consid
 - [fireheadman](https://github.com/fireheadman) for assisting with support for WF39M dimmer smartplugs.
 - [yousaf465](https://github.com/yousaf465) for contributing Urdu translations.
 - [wisemanny](https://github.com/wisemanny) for contributing support for Zigbee Door/Window sensors and Loratap QCSC400ZB Zigbee curtain switches.
+- [erwin-faceit](https://github.com/erwin-faceit) for assisting with support for Dreamlight LED strips.

+ 1 - 0
DEVICES.md

@@ -399,6 +399,7 @@ of device.
 - Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also). Three versions - standard dps layout starting from 20, with and without scene/music modes and timer, and a non-standard layout starting from 1 but following the same pattern (tested with "A60" bulbs).
 - Generic RGBW lightbulb in the standard and non-standard patterns above but without color temperature control.
 - Generic dimmable/color temperature adjustable desktop lamp (confirmed with Setti+ SL601)
+- Generic "Dreamlight" RGBCW LED strips (tested with LSC RGBIC+CCT 2x5m LED strip)
 - Generic RGB only light bar - like the lights above, but no white light controls supported.
 - A60 1800-2700K RGBWW light
 - Atomi smart color string light

+ 115 - 0
custom_components/tuya_local/devices/dreamlight_led_strip.yaml

@@ -0,0 +1,115 @@
+name: RGBCW light strip
+products:
+  - id: aok3caeleulg1neh
+    name: LSC LED Strip RGBIC+CCT 2x5M
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 21
+      type: string
+      name: color_mode
+      mapping:
+        - dps_val: white
+          value: color_temp
+        - dps_val: colour
+          value: hs
+        - dps_val: scene
+          value: Scene
+        - dps_val: music
+          value: Music
+    - id: 22
+      name: brightness
+      type: integer
+      optional: true
+      range:
+        min: 10
+        max: 1000
+      mapping:
+        - dps_val: null
+          value: 0
+        - scale: 3.92
+    - id: 23
+      name: color_temp
+      type: integer
+      optional: true
+      range:
+        min: 0
+        max: 1000
+      mapping:
+        - target_range:
+            min: 2700
+            max: 6500
+    - id: 24
+      name: rgbhsv
+      type: hex
+      optional: true
+      format:
+        - name: h
+          bytes: 2
+          range:
+            min: 0
+            max: 360
+        - name: s
+          bytes: 2
+          range:
+            min: 0
+            max: 1000
+        - name: v
+          bytes: 2
+          range:
+            min: 0
+            max: 1000
+    - id: 27
+      name: music_data
+      type: hex
+      optional: true
+    - id: 46
+      name: length_cm
+      type: integer
+    - id: 47
+      name: pixels
+      type: integer
+    - id: 51
+      name: dreamlight_scene
+      type: string
+      optional: true
+    - id: 52
+      name: dreamlight_music_data
+      type: string
+      optional: true
+    - id: 61
+      name: paint_colour_data
+      type: string
+      optional: true
+secondary_entities:
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 26
+        name: value
+        type: integer
+        optional: true
+        range:
+          min: 0
+          max: 86400
+        unit: min
+        mapping:
+          - scale: 60
+            step: 60
+          - dps_val: null
+  - entity: number
+    name: Pixels
+    category: config
+    icon: "mdi:dots-grid"
+    dps:
+      - id: 53
+        type: integer
+        name: value
+        range:
+          min: 1
+          max: 1000