فهرست منبع

Inventor dehumidifer: Allow non-integer target humidity

Another user trying to add their dehumidifier is getting failures because the
humidity dp is actually a string not an integer.  The values "40" and "50"
were documented, so it looked like it could be treated as an integer with
step 10 and range 40 to 50, but it seems the value "CO" (constant?) is also
a possible value.

Map "CO" to 30 (out of range so it cannot be manually selected - I suspect
"CO" is automatically used when in the previously undocumented "manual" mode).

Issue #263
Jason Rumney 3 سال پیش
والد
کامیت
05f3e4dd27
1فایلهای تغییر یافته به همراه12 افزوده شده و 2 حذف شده
  1. 12 2
      custom_components/tuya_local/devices/inventor_atmospherexl_dehumidifier.yaml

+ 12 - 2
custom_components/tuya_local/devices/inventor_atmospherexl_dehumidifier.yaml

@@ -14,13 +14,21 @@ primary_entity:
           icon: "mdi:air-humidifier"
           icon_priority: 3
     - id: 3
-      type: integer
+      type: string
       name: humidity
       range:
         min: 40
         max: 50
       mapping:
-        - step: 10
+        - dps_val: "CO"
+          value: 30
+          step: 10
+        - dps_val: "40"
+          value: 40
+          step: 10
+        - dps_val: "50"
+          value: 50
+          step: 10
     - id: 5
       type: string
       name: mode
@@ -29,6 +37,8 @@ primary_entity:
           value: Dehumidify
         - dps_val: night
           value: Sleep
+        - dps_val: manual
+          value: Manual
     - id: 19
       type: bitfield
       name: error_code