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

Klarstein DryFy: deprecate the fan

Fan presets can be moved to humidifier modes.
The oscillation is a bit of a hack, the full set of values requires the select.
The switch is already duplicated in the humidifier.
Jason Rumney 2 лет назад
Родитель
Сommit
ff95176a25

+ 22 - 9
custom_components/tuya_local/devices/klarstein_dryfy_pro_connect_dehumidifier.yaml

@@ -9,6 +9,19 @@ primary_entity:
     - id: 1
       name: switch
       type: boolean
+    - id: 2
+      name: mode
+      type: string
+      optional: true
+      mapping:
+        - dps_val: auto
+          value: auto
+        - dps_val: high
+          value: boost
+        - dps_val: low
+          value: eco
+        - dps_val: fan
+          value: purify
     - id: 4
       type: integer
       name: humidity
@@ -19,6 +32,7 @@ primary_entity:
         - step: 5          
 secondary_entities:
   - entity: fan
+    deprecated: humidifier mode
     dps:
       - id: 1
         name: switch
@@ -28,15 +42,14 @@ secondary_entities:
         type: string
         optional: true
         mapping:
-          - dps_val: "auto"
-            value: "Auto"
-          - dps_val: "high"
-            value: "High"
-            icon_priority: 4
-          - dps_val: "low"
-            value: "Low"
-          - dps_val: "fan"
-            value: "Fan"
+          - dps_val: auto
+            value: auto
+          - dps_val: high
+            value: high
+          - dps_val: low
+            value: low
+          - dps_val: fan
+            value: Fan
       - id: 102
         name: oscillate
         type: string