Browse Source

Owon PCT513: change the handling for C/F temperatures

The way scale was defined in the default case and overridden for F may
be making it work incorrectly. Define scale separately for C instead.

Issue #1948
Jason Rumney 1 year ago
parent
commit
4e378216c3
1 changed files with 9 additions and 7 deletions
  1. 9 7
      custom_components/tuya_local/devices/owon_pct513_thermostat.yaml

+ 9 - 7
custom_components/tuya_local/devices/owon_pct513_thermostat.yaml

@@ -26,21 +26,23 @@ primary_entity:
       type: integer
       name: temperature
       range:
-        min: 1500
+        min: 41
         max: 4500
       mapping:
-        - scale: 100
-          step: 50
-          constraint: temperature_unit
+        - constraint: temperature_unit
           conditions:
             - dps_val: f
               value_redirect: temp_f
-              mapping:
-                - scale: 1
-                  step: 1
               range:
                 min: 41
                 max: 90
+            - dps_val: c
+              range:
+                min: 1500
+                max: 4500
+              mapping:
+                - scale: 100
+                  step: 50
     - id: 17
       type: integer
       name: temp_f