Преглед изворни кода

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 година
родитељ
комит
4a54ac22ed
1 измењених фајлова са 3 додато и 5 уклоњено
  1. 3 5
      custom_components/tuya_local/devices/owon_pct513_thermostat.yaml

+ 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