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

Klarstein dehumidifier: use fan entity rather than selects

Simplify config by removing some icons that just mimick the default (looks
copy and paste from another dehumidifier that had some more complex icon logic
based on the icon_priority assigned).
Jason Rumney 3 лет назад
Родитель
Сommit
4fb82d4616

+ 20 - 16
custom_components/tuya_local/devices/klarstein_dryfy_pro_connect_dehumidifier.yaml

@@ -9,13 +9,6 @@ primary_entity:
     - id: 1
       name: switch
       type: boolean
-      mapping:
-        - dps_val: false
-          icon: "mdi:air-humidifier-off"
-          icon_priority: 3
-        - dps_val: true
-          icon: "mdi:air-humidifier"
-          icon_priority: 5        
     - id: 4
       type: integer
       name: humidity
@@ -25,12 +18,13 @@ primary_entity:
       mapping:
         - step: 5          
 secondary_entities:
-  - entity: select
-    name: "Mode"
-    icon: "mdi:fan"
+  - entity: fan
     dps:
+      - id: 1
+        name: switch
+        type: boolean
       - id: 2
-        name: option
+        name: preset_mode
         type: string
         optional: true
         mapping:
@@ -43,9 +37,19 @@ secondary_entities:
             value: "Low"
           - dps_val: "fan"
             value: "Fan"
-
+      - id: 102
+        name: oscillate
+        type: string
+        optional: true
+        mapping:
+          - dps_val: "0_90"
+            value: true
+          - dps_val: "45"
+            value: false
+          - dps_val: "90"
+            value: false
   - entity: select
-    name: "OSC"
+    name: Direction
     category: config
     icon: "mdi:sprinkler-variant"
     dps:
@@ -79,7 +83,7 @@ secondary_entities:
         unit: C
         class: measurement
   - entity: switch
-    name: "UV sterilization"
+    name: UV sterilization
     icon: "mdi:shield-half-full"
     dps:
       - id: 10
@@ -95,9 +99,9 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: false
-            value: ON
+            value: true
           - dps_val: true
-            value: OFF        
+            value: false  
   - entity: switch
     name: "Humidity indicator"
     category: config