Sfoglia il codice sorgente

Add support for screensync light

Issue #264

Basic lighting functions similar to rgbcw_lightbulb, except that colour
temperature is not supported, so instead of color_temp, use white when in
white mode.

More advanced functions (HDMI sync, scenes) requires more understanding of
the light functionality, in particular the custom dps with id > 100.
Jason Rumney 3 anni fa
parent
commit
31f1392bf9

+ 3 - 1
ACKNOWLEDGEMENTS.md

@@ -123,4 +123,6 @@ Further device support has been made with the assistance of users.  Please consi
 - [fsevilla3](https://github.com/fsevilla3) for contributing support for water_heater entities and Hydrotherm Dynamix/X8 water heaters.
 - [allistermaguire](https://github.com/allistermaguire) for contributing improvements to Saswell C16 thermostats.
 - [karnas99](https://github.com/karnas99) for assistance in improving Hysen thermostat support.
-- [cooperaj](https://github.com/cooperaj) for contributing support for ElectriQ CD12PRO-LE dehumidifiers.
+- [cooperaj](https://github.com/cooperaj) for contributing support for ElectriQ CD12PRO-LE dehumidifiers.
+- [geroulas](https://github.com/geroulas) for assisting with support for Inventor Atmosphere XL dehumidifiers.
+- [and7ey](https://github.com/and7ey) for assisting with support for Screen sync smart lights.

+ 2 - 0
DEVICES.md

@@ -114,6 +114,7 @@
 - Eesee Adam dehumidifier
 - Hyundai Sahara dehumidifier
 - AlecoAir D14 purifying dehumidifier
+- Inventor Atmosphere XL dehumidifier
 
 ### Humidifiers
 
@@ -171,6 +172,7 @@ Other brands may work with the above configurations
 
 - Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also)
 - Atomi smart color string light
+- Screen sync smart light 2.0
 
 ### Covers
 

+ 91 - 0
custom_components/tuya_local/devices/screensync_light.yaml

@@ -0,0 +1,91 @@
+name: Screen sync smart light 2.0
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 21
+      type: string
+      name: color_mode
+      mapping:
+        - dps_val: white
+          value: white
+        - dps_val: colour
+          value: rgbw
+        - dps_val: scene
+          value: colorloop
+        - dps_val: music
+          value: random
+    - id: 22
+      name: brightness
+      type: integer
+      range:
+        min: 10
+        max: 1000
+      mapping:
+        - scale: 3.92
+    - 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
+      optional: true
+    - id: 25
+      type: hex
+      name: scene_data
+      optional: true
+    - id: 27
+      type: hex
+      name: music_data
+      optional: true
+    - id: 28
+      type: hex
+      name: control_data
+      optional: true
+    - id: 101
+      type: string
+      name: setup_side
+      optional: true
+    - id: 102
+      type: string
+      name: light_type
+      optional: true
+    - id: 103
+      type: string
+      name: install_location
+      optional: true
+    - id: 104
+      type: string
+      name: scene
+      optional: true
+secondary_entities:
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 26
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        unit: min
+        mapping:
+          - scale: 60
+            step: 60