Просмотр исходного кода

Add support for generic RGB "dreamlight" garland.

"Dreamlight" comes from the dp names - likely compatible if we can
work out the scene format.

Issue #2724
Jason Rumney 1 год назад
Родитель
Сommit
3b705bae6c
3 измененных файлов с 107 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 105 0
      custom_components/tuya_local/devices/rgbled_garland.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -812,3 +812,4 @@ Further device support has been made with the assistance of users. Please consid
 - [szemkhel](https://github.com/szemkhel) for assisting with support for Protmex PT-19DW alarm clock with temperature and humidity monitor.
 - [dimis7](https://github.com/dimis7) for assisting with support for Inventor Rise Pro dehumidifier.
 - [Bryla2507](https://github.com/Bryla2507) for assisting with support for LSC dual band outdoor camera.
+- [PaPa1ya](https://github.com/PaPa1ya) for assisting with support for generic RGB "dreamlight" garland.

+ 1 - 0
DEVICES.md

@@ -609,6 +609,7 @@ of device.
 - 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 "Dreamlight" LED strip
 - Generic RGB only light bar - like the lights above, but no white light controls supported.
 - Unbranded 1CH dimmer module
 - Unbranded dual dimmer module

+ 105 - 0
custom_components/tuya_local/devices/rgbled_garland.yaml

@@ -0,0 +1,105 @@
+name: Fairy lights
+products:
+  - id: dpfvez4c2ui18yef
+entities:
+  - entity: light
+    icon: "mdi:led-strip"
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+      - id: 21
+        name: effect
+        type: string
+        mapping:
+          - dps_val: white
+            value: none
+            hidden: true
+          - dps_val: colour
+            value: none
+          - dps_val: scene
+            value: Scene
+          - dps_val: music
+            value: Music
+      - id: 24
+        name: rgbhsv
+        type: hex
+        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: 51
+        type: string
+        optional: true
+        name: dreamlight_scene_mode
+      - id: 52
+        type: string
+        optional: true
+        name: dreamlightmic_music_data
+      - id: 61
+        type: string
+        optional: true
+        name: paint_color_data
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        precision: 0
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    name: LED count
+    category: config
+    icon: "mdi:led-strip-variant"
+    dps:
+      - id: 53
+        type: integer
+        name: value
+        range:
+          min: 1
+          max: 1000
+      - id: 47
+        type: integer
+        name: from_device
+  - entity: select
+    name: Color order
+    icon: "mdi:order-bool-ascending"
+    category: config
+    dps:
+      - id: 101
+        type: string
+        name: option
+        mapping:
+          - dps_val: RGB
+            value: RGB
+          - dps_val: RBG
+            value: RBG
+          - dps_val: GRB
+            value: GRB
+          - dps_val: GBR
+            value: GBR
+          - dps_val: BRG
+            value: BRG
+          - dps_val: BGR
+            value: BGR