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

Klarstein Dryfy Pro: merge into identical Electriq CD20pro config

The only real differences were that the later added Klarstein had some
dps marked optional, and used a select for vane control instead of the
unnatural forcing into a fan entity that the CD20pro has. Now
deprecated that fan, to be replaced by the select.
Jason Rumney 1 год назад
Родитель
Сommit
f02cc3069b

+ 30 - 1
custom_components/tuya_local/devices/electriq_cd20pro_dehumidifier.yaml

@@ -1,4 +1,12 @@
-name: "Electriq CD20PRO-LE-V2 dehumidifier"
+name: Dehumidifier
+legacy_key: klarstein_dryfy_pro_connect_dehumidifier
+products:
+  - id: b07ueqf4ymelhbi9
+    name: Klarstein DryFy Pro Connect V2
+  - id: 6cguug02fnygou5c
+    name: Klarstein Dryfy Pro Connect
+  - id: m0wtqltrepknlpdj
+    name: Morris Premier plus
 primary_entity:
   entity: humidifier
   class: dehumidifier
@@ -16,6 +24,7 @@ primary_entity:
     - id: 2
       name: mode
       type: string
+      optional: true
       mapping:
         - dps_val: auto
           value: auto
@@ -41,8 +50,25 @@ primary_entity:
       mapping:
         - step: 5
 secondary_entities:
+  - entity: select
+    name: Direction
+    category: config
+    icon: "mdi:sprinkler-variant"
+    dps:
+      - id: 102
+        name: option
+        type: string
+        optional: true
+        mapping:
+          - dps_val: "0_90"
+            value: "45°-90°"
+          - dps_val: "45"
+            value: "45°"
+          - dps_val: "90"
+            value: "90°"
   - entity: fan
     translation_only_key: fan_with_presets
+    deprecated: select_direction
     dps:
       - id: 1
         type: boolean
@@ -50,6 +76,7 @@ secondary_entities:
       - id: 102
         name: preset_mode
         type: string
+        optional: true
         mapping:
           - dps_val: "45"
             value: sleep
@@ -60,6 +87,7 @@ secondary_entities:
       - id: 102
         name: oscillate
         type: string
+        optional: true
         mapping:
           - dps_val: "0_90"
             value: true
@@ -84,6 +112,7 @@ secondary_entities:
     dps:
       - id: 5
         name: switch
+        optional: true
         type: boolean
   - entity: sensor
     class: temperature

+ 0 - 87
custom_components/tuya_local/devices/klarstein_dryfy_pro_connect_dehumidifier.yaml

@@ -1,87 +0,0 @@
-name: Dehumidifier
-# {'updated_at': 1674605185.2896934, '1': True, '2': 'auto', '3': 57, '4': 55,
-#  '10': True, '101': True, '102': '0_90', '103': 24}
-products:
-  - id: b07ueqf4ymelhbi9
-    name: Klarstein DryFy Pro Connect V2
-  - id: 6cguug02fnygou5c
-    name: Klarstein Dryfy Pro Connect
-  - id: m0wtqltrepknlpdj
-    name: Morris Premier plus
-primary_entity:
-  entity: humidifier
-  class: dehumidifier
-  dps:
-    - 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: 3
-      type: integer
-      name: current_humidity
-    - id: 4
-      type: integer
-      name: humidity
-      range:
-        min: 35
-        max: 80
-      mapping:
-        - step: 5
-secondary_entities:
-  - entity: select
-    name: Direction
-    category: config
-    icon: "mdi:sprinkler-variant"
-    dps:
-      - id: 102
-        name: option
-        type: string
-        optional: true
-        mapping:
-          - dps_val: "0_90"
-            value: "45°-90°"
-          - dps_val: "45"
-            value: "45°"
-          - dps_val: "90"
-            value: "90°"
-  - entity: sensor
-    class: temperature
-    dps:
-      - id: 103
-        type: integer
-        name: sensor
-        unit: C
-        class: measurement
-  - entity: switch
-    translation_key: uv_sterilization
-    dps:
-      - id: 10
-        name: switch
-        type: boolean
-  - entity: switch
-    translation_key: ionizer
-    dps:
-      - id: 5
-        name: switch
-        type: boolean
-        optional: true
-  - entity: switch
-    name: "Humidity indicator"
-    category: config
-    icon: "mdi:dots-circle"
-    dps:
-      - id: 101
-        name: switch
-        type: boolean