Przeglądaj źródła

Add support for Teberno LED lights

These are a bit problematic, as the logs only show them with dps
20 (switch) and 26 (timer), but they have rgb and scene dps listed in
the tuya docs, as well.  Home Assistant seems to have an assumption
that any light capable of more than just on/off also supports
brightness, which does not seem true of this light in white mode.
It is possible that white mode is not really supported, but then the
initial colour setting is unknown...

Since the log did not show the RGBHSV format, and the
QueryThingsDataModel result did not break down the fields, I had to
make a guess that with this dp layout it will follow the newer 6 byte
hsv format, rather than the older 7 byte rgbhsv.

Issue #1095
Jason Rumney 2 lat temu
rodzic
commit
a1906f0148

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -375,3 +375,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [sebastianciupinski](https://github.com/sebastianciupinski) for contributing support for Dcenta dual clamp meters.
 - [cykus](https://github.com/cykus) for contributing support for Rotenso Roni X air conditioners.
 - [KrX3D](https://github.com/KrX3D) for assisting with support for Suntec Wellness Coolfixx air conditioners.
+- [DanielRitter75](https://github.com/DanielRitter75) for assisting with support for Teberno LED strip lights.

+ 1 - 0
DEVICES.md

@@ -371,6 +371,7 @@ of device.
 - MoesGo dimmer switch
 - Space Dog Music Lamp
 - Tampa Magnetic LED System CD-TY-WY05
+- Teberno LED strip light (LGC-005 OEM3)
 - WF520D dual dimmer touchpanel
 
 ### Covers

+ 64 - 0
custom_components/tuya_local/devices/rgb_led_strip.yaml

@@ -0,0 +1,64 @@
+name: LED strip
+products:
+  - id: dga9j4k3myutu1qo
+    name: Teberno LGC-005 OEM3
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 21
+      type: string
+      name: color_mode
+      optional: true
+      mapping:
+        - dps_val: white
+          value: white
+        - dps_val: colour
+          value: hs
+        - dps_val: scene
+          value: Scene
+        - dps_val: null
+          value: white
+          hidden: true
+    - id: 24
+      type: hex
+      name: rgbhsv
+      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: 25
+      type: string
+      name: scene_data
+      optional: true
+secondary_entities:
+  - 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