Procházet zdrojové kódy

Light string: Fix Scene mapping. Map scene and music as original names

- was incorrectly using name instead of value in the Scene mapping.
- no need to map scene and music to colorloop and random.  There seems to be no advantage of using predefined effect names, and it is just confusing.

Issue #309
Jason Rumney před 3 roky
rodič
revize
0e2ae3fb9f

+ 16 - 16
custom_components/tuya_local/devices/light_string.yaml

@@ -12,9 +12,9 @@ primary_entity:
         - dps_val: colour
           value: rgbw
         - dps_val: scene
-          value: colorloop
+          value: Scene
         - dps_val: music
-          value: random
+          value: Music
     - id: 24
       name: rgbhsv
       type: hex
@@ -45,33 +45,33 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "0103e8"
-            name: Palm
+            value: Palm
           - dps_val: "0101f1"
-            name: "Palm 50%"
+            value: "Palm 50%"
           - dps_val: "0203e8"
-            name: Christmas tree
+            value: Christmas tree
           - dps_val: "0201f1"
-            name: "Christmas tree 50%"
+            value: "Christmas tree 50%"
           - dps_val: "0303e8"
-            name: Fence
+            value: Fence
           - dps_val: "0301f1"
-            name: "Fence 50%"
+            value: "Fence 50%"
           - dps_val: "0403e8"
-            name: Rainbow
+            value: Rainbow
           - dps_val: "0401f1"
-            name: "Rainbox 50%"
+            value: "Rainbox 50%"
           - dps_val: "0503e8"
-            name: Photos
+            value: Photos
           - dps_val: "0501f1"
-            name: "Photos 50%"
+            value: "Photos 50%"
           - dps_val: "0603e8"
-            name: Fairy lights
+            value: Fairy lights
           - dps_val: "0601f1"
-            name: "Fairy lights 50%"
+            value: "Fairy lights 50%"
           - dps_val: "0703e8"
-            name: Wreath
+            value: Wreath
           - dps_val: "0701f1"
-            name: "Wreath 50%"
+            value: "Wreath 50%"
   - entity: select
     name: Music mode
     category: config