Przeglądaj źródła

Add support for Atomi string lights

Issue #255
Jason Rumney 3 lat temu
rodzic
commit
be6a691cd4

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -88,7 +88,7 @@ Further device support has been made with the assistance of users.  Please consi
 - [Utopia69](https://github.com/Utopia69) for providing additional info on his Fairland IPH45 heatpump (matching Madimack)
 - [Seopgroenten](https://github.com/Soepgronten) for assistance with W'eau pool heatpumps.
 - [choppedpork](https://github.com/choppedpork) for contributing support for QS Wifi curtain modules.
-- [Swiftnesses](https://github.com/Swiftnesses) for assistance with Devola patio heaters.
+- [Swiftnesses](https://github.com/Swiftnesses) for assistance with Devola patio heaters and Atomi string lights.
 - [odeBuXTeR](https://github.com/odeBuXTeR) for contributing support for Poolex Q-line pool heatpumps.
 - [peterforeman](https:github.com/peterforeman) for assistance with improving Fairland/Madimack support.
 - [Krispkiwi](https://github.com/Krispkiwi) for assistance with M027 curtain modules and debugging Kogan Kettle.

+ 1 - 0
DEVICES.md

@@ -169,6 +169,7 @@ Other brands may work with the above configurations
 ### Lights
 
 - Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also)
+- Atomi smart color string light
 
 ### Covers
 

+ 76 - 0
custom_components/tuya_local/devices/atomi_string_lights.yaml

@@ -0,0 +1,76 @@
+name: Atomi string lights
+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: colour
+        - dps_val: scene1
+          value: Strobe
+        - dps_val: scene2
+          value: Fade
+        - dps_val: scene3
+          value: Pulse
+        - dps_val: scene4
+          value: Blink
+        - dps_val: scene5
+          value: Chase
+        - dps_val: scene6
+          value: Christmas
+        - dps_val: scene7
+          value: America
+        - dps_val: scene8
+          value: Pick 2
+        - dps_val: scene9
+          value: Multi
+    - id: 22
+      name: brightness
+      type: integer
+      range:
+        min: 25
+        max: 255
+    - id: 23
+      name: color_temp
+      type: integer
+      range:
+        min: 0
+        max: 255
+      mapping:
+        - invert: true
+    - id: 24
+      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: 101
+      name: scene_data
+      type: hex
+      optional: true