Explorar el Código

Emerio DH-129238: use standard modes

- use normal, purify and laundry for modes, as translations are available for those
- rename file to match naming convention
- use bitfield rather than integer for tank sensor (likely other fault codes are also encoded alongside)

PR #2954
Jason Rumney hace 1 año
padre
commit
cc2e34d453

+ 7 - 14
custom_components/tuya_local/devices/emerio_dh_129238_dehumidifier.yaml → custom_components/tuya_local/devices/emerio_dh129238_dehumidifier.yaml

@@ -10,13 +10,6 @@ entities:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 1
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 4
       - id: 2
         name: humidity
         type: integer
@@ -29,12 +22,12 @@ entities:
         name: mode
         type: string
         mapping:
-          - dps_val: 0
-            value: dehumidify
-          - dps_val: 1
-            value: fan
-          - dps_val: 2
-            value: dry
+          - dps_val: "0"
+            value: normal
+          - dps_val: "1"
+            value: purify
+          - dps_val: "2"
+            value: laundry
       - id: 6
         type: integer
         name: current_humidity
@@ -56,7 +49,7 @@ entities:
     category: diagnostic
     dps:
       - id: 101
-        type: integer
+        type: bitfield
         name: sensor
         mapping:
           - dps_val: 0