Browse Source

Screensync light: rename scene_data to effect and add mappings

Experimental change to see if the scenes can work with fixed mapping.
Although the format has encoded info, the data captured shows all except first
byte are 0, so it may work with just the first byte as a selector and the rest
all 0.
Issue #264
Jason Rumney 3 years ago
parent
commit
fd7994505d
1 changed files with 41 additions and 4 deletions
  1. 41 4
      custom_components/tuya_local/devices/screensync_light.yaml

+ 41 - 4
custom_components/tuya_local/devices/screensync_light.yaml

@@ -14,9 +14,7 @@ primary_entity:
         - dps_val: colour
           value: rgbw
         - dps_val: scene
-          value: colorloop
-        - dps_val: music
-          value: random
+          value: Scene
     - id: 22
       name: brightness
       type: integer
@@ -47,7 +45,46 @@ primary_entity:
       optional: true
     - id: 25
       type: hex
-      name: scene_data
+      name: effect
+      mapping:
+        - dps_val: 01000000000000000000000000000000
+          value: Static
+        - dps_val: 80000000000000000000000000000000
+          value: Movie
+        - dps_val: 81000000000000000000000000000000
+          value: Video
+        - dps_val: 82000000000000000000000000000000
+          value: Game
+        - dps_val: 83000000000000000000000000000000
+          value: Spectrum
+        - dps_val: 84000000000000000000000000000000
+          value: Electronic
+        - dps_val: 85000000000000000000000000000000
+          value: Listen
+        - dps_val: 86000000000000000000000000000000
+          value: Rainbow
+        - dps_val: 87000000000000000000000000000000
+          value: Fire
+        - dps_val: 88000000000000000000000000000000
+          value: Read
+        - dps_val: 89000000000000000000000000000000
+          value: Firework
+        - dps_val: 90000000000000000000000000000000
+          value: Star
+        - dps_val: 91000000000000000000000000000000
+          value: Drip
+        - dps_val: 92000000000000000000000000000000
+          value: Particle
+        - dps_val: 93000000000000000000000000000000
+          value: Flow
+        - dps_val: 94000000000000000000000000000000
+          value: Ball
+        - dps_val: 95000000000000000000000000000000
+          value: Swing
+        - dps_val: 96000000000000000000000000000000
+          value: Breath
+        - dps_val: 97000000000000000000000000000000
+          value: Pure
       optional: true
     - id: 27
       type: hex