Преглед на файлове

feat(temprium_pac011_airconditioner) fahrenheit/celsius confusion bug (#5493)

* feat(temprium_pac011_airconditioner) fahrenheit/celsius confusion bug workaround

Temprium PAC011 v1.0.0(3.1.69) is identical to Meaco Cirro but with a bug
whereby dps-3 (current temperature) stabilizes at the current temperature
in fahrenheit regardless of the configured temperature_unit; however,
dps-24 (temp_current_f on meaco_cirro) stabilizes at the celsius value.

This workaround effectively swaps them.  At the instant of changing units,
they will report the wrong temperature, but this does not appear to show
in HASS and for the rest of the time the values appear correct.

Seems to Fix PR #5485's remaining bug.

* Remove explanation of Temprium PAC011 removal
Tom Gidden преди 6 дни
родител
ревизия
7254c7772f

+ 0 - 3
custom_components/tuya_local/devices/meaco_cirro_airconditioner.yaml

@@ -8,9 +8,6 @@ products:
     manufacturer: Meaco
     model: Cirro+ 14000 BTU Inverter
     model_id: CIRRO14000PRO
-  - id: kzdx8i4g0wms1vta
-    manufacturer: Temprium
-    model: PAC011
 entities:
   - entity: climate
     dps:

+ 146 - 0
custom_components/tuya_local/devices/temprium_pac011_airconditioner.yaml

@@ -0,0 +1,146 @@
+name: Air conditioner
+products:
+  - id: kzdx8i4g0wms1vta
+    manufacturer: Temprium
+    model: PAC011
+entities:
+  - entity: climate
+    dps:
+      - id: 1
+        type: boolean
+        name: hvac_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: mode
+            conditions:
+              - dps_val: Cool
+                value: cool
+              - dps_val: Dry
+                value: dry
+              - dps_val: Fan
+                value: fan_only
+              - dps_val: Heat
+                value: heat
+                available: support_heat
+      - id: 2
+        type: integer
+        name: temperature
+        range:
+          min: 16
+          max: 32
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: temp_set_f
+                range:
+                  min: 61
+                  max: 90
+      - id: 3
+        # Firmware bug: on every sensor refresh this dp is rewritten with the
+        # Fahrenheit reading regardless of dp 19, while dp 24 always holds the
+        # Celsius reading. So read dp 24 in celsius mode, dp 3 in fahrenheit.
+        type: integer
+        name: current_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: c
+                value_redirect: temp_current_c
+      - id: 4
+        type: string
+        name: mode
+        hidden: true
+      - id: 5
+        type: string
+        name: fan_mode
+        mapping:
+          - dps_val: Low
+            value: low
+          - dps_val: Mid
+            value: medium
+          - dps_val: High
+            value: high
+      - id: 15
+        type: string
+        name: swing_mode
+        mapping:
+          - dps_val: "OFF"
+            value: "off"
+          - dps_val: "ON"
+            value: "on"
+      - id: 19
+        type: string
+        name: temperature_unit
+        mapping:
+          - dps_val: c
+            value: C
+          - dps_val: f
+            value: F
+      - id: 23
+        type: integer
+        name: temp_set_f
+        optional: true
+        range:
+          min: 61
+          max: 90
+      - id: 24
+        type: integer
+        name: temp_current_c
+        optional: true
+      - id: 101
+        type: boolean
+        name: preset_mode
+        mapping:
+          - dps_val: true
+            value: sleep
+          - dps_val: false
+            value: comfort
+      - id: 103
+        type: string
+        name: support_heat
+        mapping:
+          - dps_val: C_H
+            value: true
+          - value: false
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 22
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: 4
+            value: false
+          - value: true
+      - id: 22
+        type: bitfield
+        name: fault_code
+  - entity: binary_sensor
+    translation_key: tank_full
+    category: diagnostic
+    dps:
+      - id: 22
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 4
+            value: true
+          - value: false
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 19
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit