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

Jiahong thermostat: simplify hvac_action mapping

Reverse the order of constraint and mapping: since power off always maps to
off regardless of what the sensor says, this simplifies the conditions
slightly, reducing from 4 branches to 3.
Jason Rumney преди 2 години
родител
ревизия
6422c85192
променени са 1 файла, в които са добавени 6 реда и са изтрити 11 реда
  1. 6 11
      custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml

+ 6 - 11
custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml

@@ -74,20 +74,15 @@ primary_entity:
       type: boolean
       name: hvac_action
       mapping:
-        - dps_val: true
-          constraint: hvac_mode
+        - constraint: hvac_mode
           conditions:
-            - dps_val: true
-              value: heating
-            - dps_val: false
-              value: "off"
-        - dps_val: false
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
             - dps_val: false
               value: "off"
+            - mapping:
+                - dps_val: true
+                  value: heating
+                - dps_val: false
+                  value: idle
     - id: 104
       type: integer
       name: unknown_104