4
0
Эх сурвалжийг харах

Add support for another generic rgbcw bulb, based on "A60" bulbs.

These start at dps 1 rather than 20 favored by newer bulbs, and use
the rgbhsv format with 0-255 range for s and v rather than the hsv
format with 0-1000 range that newer bulbs use.

Issue #622
Jason Rumney 2 жил өмнө
parent
commit
d82a8ef8f6

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -245,3 +245,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [Muelner](https://github.com/Muelner) for assisting with support for WDYK 3-phase energy meter circuit breakers.
 - [Cyrelion](https://github.com/Cyrelion) for assisting with support for Lifubide X600 air purifiers.
 - [mwkchan](https://github.com/mwkchan) for assisting with support for Princess 350 panel heater.
+- [aletsweb](https://github.com/aletsweb) for assisting with support for A60 rgbcw lightbubs.

+ 1 - 1
DEVICES.md

@@ -277,7 +277,7 @@ of device.
 ### Lights
 
 - Generic dimmable light (2 types, using dp 1,2 and 20,22)
-- Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also). Two versions - with and without scene/music modes and timer.
+- 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 dimmable/color temperature adjustable desktop lamp (confirmed with Setti+ SL601)
 - Atomi smart color string light
 - Deta/Arlec motion sensor lights (DET100HA/DET102HA/MAL315HA)

+ 70 - 0
custom_components/tuya_local/devices/rgbcw_lightbulbv2.yaml

@@ -0,0 +1,70 @@
+name: RGBCW lightbulb
+products:
+  - id: bqkefojbmb8ovvws
+    name: A60 RGBW smart bulb
+primary_entity:
+  entity: light
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 2
+      name: color_mode
+      type: string
+      mapping:
+        - dps_val: white
+          value: color_temp
+        - dps_val: colour
+          value: rgbw
+    - id: 3
+      name: brightness
+      type: integer
+      range:
+        min: 25
+        max: 255
+    - id: 4
+      name: color_temp
+      type: integer
+      range:
+        min: 0
+        max: 255
+    - id: 5
+      name: rgbhsv
+      type: hex
+      format:
+        - name: r
+          bytes: 1
+        - name: g
+          bytes: 1
+        - name: b
+          bytes: 1
+        - name: h
+          bytes: 2
+          range:
+            min: 0
+            max: 360
+        - name: s
+          bytes: 1
+          range:
+            min: 0
+            max: 255
+        - name: v
+          bytes: 1
+          range:
+            min: 0
+            max: 255
+    - id: 6
+      name: scene
+      type: base64
+    - id: 7
+      name: flash_scene1
+      type: base64
+    - id: 8
+      name: flash_scene2
+      type: base64
+    - id: 9
+      name: flash_scene3
+      type: base64
+    - id: 10
+      name: flash_scene4
+      type: base64