Przeglądaj źródła

Owon PCT513: unnest scale and step from mapping in conditions

When inside a condition, scale and step are looked for directly in the
condition, they do not need another level of mapping.  Nested mappings
are simplified mappings only for mapping values one to one.

Issue #1996
Jason Rumney 1 rok temu
rodzic
commit
4a54ac22ed

+ 3 - 5
custom_components/tuya_local/devices/owon_pct513_thermostat.yaml

@@ -40,9 +40,8 @@ primary_entity:
               range:
                 min: 1500
                 max: 4500
-              mapping:
-                - scale: 100
-                  step: 50
+              scale: 100
+              step: 50
     - id: 17
       type: integer
       name: temp_f
@@ -66,8 +65,7 @@ primary_entity:
           constraint: temperature_unit
           conditions:
             - dps_val: f
-              mapping:
-                - scale: 1
+              scale: 1
               value_redirect: curtemp_f
     - id: 29
       type: integer