소스 검색

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