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

YYM 805SW: reduce redundancy in config.

- don't set speed to hidden, it turns the fan entity into a glorified switch
- don't duplicate fan speed into a separate spray mode select entity
- move Color mode into the light instead of a separate select entity
- rename "Left time" attribute to remaining, as attributes should not have spaces in the name
Jason Rumney 3 лет назад
Родитель
Сommit
5313f16e6b
1 измененных файлов с 9 добавлено и 32 удалено
  1. 9 32
      custom_components/tuya_local/devices/yym_805SW_aroma_nightlight.yaml

+ 9 - 32
custom_components/tuya_local/devices/yym_805SW_aroma_nightlight.yaml

@@ -18,7 +18,6 @@ primary_entity:
     - id: 2
       name: speed
       type: string
-      hidden: true
       mapping:
         - dps_val: large
           value: 100
@@ -32,6 +31,14 @@ secondary_entities:
       - id: 5
         name: switch
         type: boolean
+      - id: 6
+        name: color_mode
+        type: string
+        mapping:
+          - dps_val: colour
+            value: rgbw
+          - dps_val: colourful1
+            value: Colorful
       - id: 8
         name: rgbhsv
         type: hex
@@ -57,36 +64,6 @@ secondary_entities:
             range:
               min: 0
               max: 255
-  - entity: select
-    name: "Color mode"
-    category: config
-    icon: "mdi:palette"
-    dps:
-      - id: 6
-        name: option
-        type: string
-        mapping:
-          - dps_val: colour
-            value: Color
-          - dps_val: colourful1
-            value: Colorful
-  - entity: select
-    name: "Spray mode"
-    category: config
-    icon: "mdi:sprinkler-variant"
-    dps:
-      - id: 2
-        name: option
-        type: string
-        mapping:
-          - dps_val: large
-            value: Large
-            icon: "mdi:sprinkler-variant"
-            icon_priority: 5
-          - dps_val: small
-            value: Small
-            icon: "mdi:sprinkler"
-            icon_priority: 10
   - entity: select
     name: Timer
     icon: "mdi:timer"
@@ -105,7 +82,7 @@ secondary_entities:
           - dps_val: "6"
             value: "6 hours"
       - id: 4
-        name: "Left time"
+        name: remaining
         readolny: true
         optional: true
         type: integer