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

Galaxy projector: add scenes, icons and more/alternative effects

Based on issue #1507
- scenes are additional (not properly defined in previous version) so assume they are the same
- effects are different, put the different lists on different lights: the user will have
  to learn which one works for their light.
- icons provide some additional benefit
Jason Rumney 1 год назад
Родитель
Сommit
8526258509
1 измененных файлов с 34 добавлено и 7 удалено
  1. 34 7
      custom_components/tuya_local/devices/galaxy_projector_light.yaml

+ 34 - 7
custom_components/tuya_local/devices/galaxy_projector_light.yaml

@@ -1,6 +1,9 @@
-name: Galaxy Light
+name: Star projector
 products:
 products:
   - id: okyhahmixunjmbca
   - id: okyhahmixunjmbca
+    name: Galaxy projector
+  - id: jteg9ktrhbxtiicz
+    name: BlissLights Sky Lite Evolve SKY-EVOLVE-B-RCW8
 primary_entity:
 primary_entity:
   entity: light
   entity: light
   dps:
   dps:
@@ -48,6 +51,16 @@ secondary_entities:
         mapping:
         mapping:
           - scale: 60
           - scale: 60
             step: 60
             step: 60
+      - id: 51
+        name: effect
+        type: string
+        mapping:
+          - dps_val: scene
+            value: Scene
+          - dps_val: laser
+            value: Laser
+          - dps_val: colour
+            value: Color
   - entity: light
   - entity: light
     translation_key: laser
     translation_key: laser
     dps:
     dps:
@@ -64,18 +77,15 @@ secondary_entities:
         name: effect
         name: effect
         type: string
         type: string
         mapping:
         mapping:
-          - dps_val: manual
-            value: Manual
           - dps_val: scene
           - dps_val: scene
             value: Scene
             value: Scene
+          - dps_val: manual
+            value: Manual
           - dps_val: music
           - dps_val: music
             value: Music
             value: Music
-      - id: 58
-        name: star_scene
-        type: string
-        optional: true
   - entity: fan
   - entity: fan
     name: Laser movement
     name: Laser movement
+    icon: "mdi:rotate-3d-variant"
     dps:
     dps:
       - id: 60
       - id: 60
         type: boolean
         type: boolean
@@ -86,3 +96,20 @@ secondary_entities:
         range:
         range:
           min: 0
           min: 0
           max: 100
           max: 100
+  - entity: select
+    name: Theme
+    icon: "mdi:movie-open-play"
+    category: config
+    dps:
+      - id: 58
+        type: string
+        name: option
+        mapping:
+          - dps_val: "AAA="
+            value: Cosmos
+          - dps_val: "AAE="
+            value: Sky
+          - dps_val: "AAI="
+            value: Space
+          - dps_val: "AAM="
+            value: Ocean