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

Add support for Galaxy Projector

Issue #770
Jason Rumney 2 лет назад
Родитель
Сommit
9266f60e4e

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -278,3 +278,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [Doudou14](https://github.com/Doudou14) for contributing support for PC311-TY power meter, and French translation.
 - [ntrits](https://github.com/ntrits) for contributing support for 8 byte phase info variant of SmartMCB SMT-006 energy meter.
 - [xgustavoh](https://github.com/xgustavoh) for contributing support for NovaDigital 4-way switches, and single switch which was merged with the Somgom switch.
+- [cramer52](https://github.com/cramer52) for contributing support for Galaxy Projectors.

+ 1 - 0
DEVICES.md

@@ -300,6 +300,7 @@ of device.
 - Deta/Arlec motion sensor lights (DET100HA/DET102HA/MAL315HA)
 - Deta 6910HA series2 dimmer switch
 - Dual-mode magic light string controller
+- Galaxy Projector
 - HDMI sync light
 - iHD001 LED controller
 - Moes dimmer switch

+ 90 - 0
custom_components/tuya_local/devices/galaxy_projector_light.yaml

@@ -0,0 +1,90 @@
+name: Galaxy Light
+products:
+  - id: okyhahmixunjmbca
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 52
+      type: boolean
+      name: color_mode
+      mapping:
+        - dps_val: false
+          value: white
+        - dps_val: true
+          value: hs
+    - 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: 10
+            max: 1000
+secondary_entities:
+  - entity: number
+    name: Timer
+    dps:
+      - id: 26
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 86400
+        unit: min
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: light
+    name: Laser
+    dps:
+      - id: 53
+        type: boolean
+        name: switch
+      - id: 54
+        name: brightness
+        type: integer
+        range:
+          min: 10
+          max: 1000
+        mapping:
+          - scale: 3.92
+      - id: 51
+        name: effect
+        type: string
+        mapping:
+          - dps_val: manual
+            value: Manual
+          - dps_val: scene
+            value: Scene
+          - dps_val: music
+            value: Music
+      - id: 58
+        name: star_scene
+        type: string
+        optional: true
+  - entity: fan
+    name: Laser movement
+    dps:
+      - id: 60
+        type: boolean
+        name: switch
+      - id: 62
+        type: integer
+        name: speed
+        range:
+          min: 0
+          max: 100