Bläddra i källkod

Add support for iHD001 LED controller

Issue #415
Jason Rumney 3 år sedan
förälder
incheckning
ce55b37443
3 ändrade filer med 104 tillägg och 1 borttagningar
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 102 0
      custom_components/tuya_local/devices/ih001_led_controller.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -185,4 +185,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [ruaandeysel](https://github.com/ruaandeysel) for assistance supporting Skyfan DC fans.
 - [DataGeek-AU](https://github.com/DataGeek-AU) for contributing support for Breville Easy Air purifiers.
 - [Clam58](https://github.com/Clam58) for contributing support for Ebac DJ4000 dehumidifierss.
-- [rafazundt](https://github.com/rafazundt) for assisting with support for AOFO ZLD and other 4-way+USB powerstrips.
+- [rafazundt](https://github.com/rafazundt) for assisting with support for AOFO ZLD and other 4-way+USB powerstrips, and iH001 LED controllers.

+ 1 - 0
DEVICES.md

@@ -231,6 +231,7 @@ generic configurations known to work with multiple brands of device.
 - Deta 6910HA series2 dimmer switch
 - Dual-mode magic light string controller
 - HDMI sync light
+- iHD001 LED controller
 - Moes dimmer switch
 - Space Dog Music Lamp
 

+ 102 - 0
custom_components/tuya_local/devices/ih001_led_controller.yaml

@@ -0,0 +1,102 @@
+name: LED controller
+product:
+  - id: ajqxccmgfnhvtew4
+    name: iH001
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 21
+      name: color_mode
+      type: string
+      mapping:
+        - dps_val: colour
+          value: rgbw
+        - 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: 27
+      type: hex
+      name: music_data
+      optional: true
+    - id: 28
+      type: hex
+      name: control_data
+      optional: true
+    - id: 34
+      type: boolean
+      name: unknown_34
+    - id: 42
+      type: hex
+      name: unknown_42
+secondary_entities:
+  - entity: select
+    name: Scene
+    icon: "mdi:pallete"
+    category: config
+    dps:
+      - id: 25
+        type: hex
+        name: option
+        mapping:
+          - dps_val: "000c0d0000000000000000c80000"
+            # color: brown, static
+            value: Night
+          - dps_val: "010e0d0000840000000003e801f4"
+            # color: white, static
+            value: Read
+          - dps_val: "020e0d0000e80383000003e803e8"
+            # color: lt cyan, static
+            value: Working
+          - dps_val: "030e0d00001403e8000001f401f4"
+            # color: grey, static
+            value: Leisure
+          - dps_val: "04464602007803e803e800000000464602007803e8000a00000000"
+            # color: G+DkG, Breath, Mid speed
+            value: Soft
+          - dps_val: "05464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000464601003d03e803e80000000046460100ae03e803e800000000464601011303e803e800000000"
+            # color* R+G+B+Y+C+V, Flash, Mid speed
+            value: Colorful
+          - dps_val: "06464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000"
+            # color* R+G+B, Flash, Mid speed
+            value: Dazzling
+          - dps_val: "07464602000003e803e800000000464602007803e803e80000000046460200f003e803e800000000464602003d03e803e80000000046460200ae03e803e800000000464602011303e803e800000000"
+            # color* R+G+B+Y+C+V, Breath, Mid speed
+            value: Gorgeous
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 26
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60