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

Add support for simpler RGBCW lightbulb.

- no timer
- no scenes or music mode

Issue #283
Jason Rumney 3 лет назад
Родитель
Сommit
8d4e286e75

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -133,3 +133,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [griszamen](https://github.com/griszamen) for assistance supporting ME80 thermostats.
 - [Tommy032017](https://github.com/Tommy032017) for assistance supporting Avatto WT100 thermostats.
 - [kekkutya](https://github.com/kekkutya) for contributing support for Beok TOL47 thermostats.
+- [eutampieri](https://github.com/eutampieri) for assisting with support for a simpler RGBCW lightbulb without timer.

+ 1 - 1
DEVICES.md

@@ -178,7 +178,7 @@ Other brands may work with the above configurations
 
 ### Lights
 
-- Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also)
+- Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also). Two versions - with and without scene/music modes and timer.
 - Atomi smart color string light
 - Screen sync smart light 2.0
 

+ 52 - 0
custom_components/tuya_local/devices/simple_rgbcw_lightbulb.yaml

@@ -0,0 +1,52 @@
+name: Simple RGBCW lightbulb
+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: rgbw
+    - id: 22
+      name: brightness
+      type: integer
+      range:
+        min: 10
+        max: 1000
+      mapping:
+        - scale: 3.92
+    - id: 23
+      name: color_temp
+      type: integer
+      optional: true
+      range:
+        min: 0
+        max: 1000
+      mapping:
+        - invert: true
+    - 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