Ver Fonte

hvac_action: simplify logic

Climate now handles the off case in code, so it is not necessary for
the config to handle the often complex logic of checking hvac_mode for
the off state.

Making this change in bulk lets the existing configs serve as a better
example for future contributors, even though the change doesn't really
have any effect on the end result.
Jason Rumney há 1 ano atrás
pai
commit
ae992c20ac
43 ficheiros alterados com 125 adições e 396 exclusões
  1. 4 10
      custom_components/tuya_local/devices/avatto_me81_thermostat.yaml
  2. 1 6
      custom_components/tuya_local/devices/avatto_wt100_thermostat.yaml
  3. 1 6
      custom_components/tuya_local/devices/awow_th213_thermostat.yaml
  4. 1 6
      custom_components/tuya_local/devices/awow_th213v2_thermostat.yaml
  5. 1 6
      custom_components/tuya_local/devices/beca_bht006_thermostat_c.yaml
  6. 1 6
      custom_components/tuya_local/devices/beok_tgm50_thermostat.yaml
  7. 2 12
      custom_components/tuya_local/devices/beok_tgr81_thermostat_c.yaml
  8. 1 6
      custom_components/tuya_local/devices/beok_tol47_thermostat.yaml
  9. 1 6
      custom_components/tuya_local/devices/beok_tr8b_thermostat.yaml
  10. 6 12
      custom_components/tuya_local/devices/bht002_galw_thermostat.yaml
  11. 10 16
      custom_components/tuya_local/devices/bht002_gblw_thermostat.yaml
  12. 0 5
      custom_components/tuya_local/devices/brade_mc6_thermostat.yaml
  13. 4 10
      custom_components/tuya_local/devices/bvf_cp1_heater.yaml
  14. 1 6
      custom_components/tuya_local/devices/calex_convector_heater.yaml
  15. 1 6
      custom_components/tuya_local/devices/casdon_td_pro_2.yaml
  16. 1 6
      custom_components/tuya_local/devices/eberg_qubo_q40hd_heatpump.yaml
  17. 4 10
      custom_components/tuya_local/devices/electric_panel_heater.yaml
  18. 0 22
      custom_components/tuya_local/devices/etop_ch7100_thermostat.yaml
  19. 0 4
      custom_components/tuya_local/devices/eurom_sani_bathroom_towel_radiator.yaml
  20. 1 6
      custom_components/tuya_local/devices/gardenpac_heatpump.yaml
  21. 6 12
      custom_components/tuya_local/devices/hysen_hy02tp_thermostat.yaml
  22. 13 19
      custom_components/tuya_local/devices/hysen_hy08acf_thermostat.yaml
  23. 4 10
      custom_components/tuya_local/devices/hysen_hy08we2_thermostat.yaml
  24. 9 12
      custom_components/tuya_local/devices/inkbird_itc306a_thermostat.yaml
  25. 1 6
      custom_components/tuya_local/devices/its_45hd_heatpump.yaml
  26. 4 10
      custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml
  27. 1 6
      custom_components/tuya_local/devices/kesser_infrared_wall_heater.yaml
  28. 4 10
      custom_components/tuya_local/devices/kkmoon_thermostat.yaml
  29. 2 12
      custom_components/tuya_local/devices/ledlux_thermostat.yaml
  30. 1 6
      custom_components/tuya_local/devices/madimack_heatpump.yaml
  31. 0 8
      custom_components/tuya_local/devices/me80_thermostat.yaml
  32. 4 10
      custom_components/tuya_local/devices/mellerware_comfy_radiator.yaml
  33. 2 12
      custom_components/tuya_local/devices/minco_mh1823d_thermostat.yaml
  34. 7 14
      custom_components/tuya_local/devices/multi_leaf_dy_107_thermostat.yaml
  35. 4 12
      custom_components/tuya_local/devices/nybro_heater.yaml
  36. 1 6
      custom_components/tuya_local/devices/poolex_q7_heatpump.yaml
  37. 4 10
      custom_components/tuya_local/devices/qh_gd_elegant_heater.yaml
  38. 2 11
      custom_components/tuya_local/devices/salcar_t9w_thermostat.yaml
  39. 4 10
      custom_components/tuya_local/devices/semptec_zx7007_heater.yaml
  40. 4 10
      custom_components/tuya_local/devices/taurus_agadir_heater.yaml
  41. 4 10
      custom_components/tuya_local/devices/valehaus_syzn119_tow_w.yaml
  42. 1 1
      custom_components/tuya_local/devices/vine_tj550_thermostat.yaml
  43. 2 12
      custom_components/tuya_local/devices/wetair_wch750_heater.yaml

+ 4 - 10
custom_components/tuya_local/devices/avatto_me81_thermostat.yaml

@@ -46,16 +46,10 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: open
-                  value: heating
-                - dps_val: close
-                  value: idle
+        - dps_val: open
+          value: heating
+        - dps_val: close
+          value: idle
     - id: 38
     - id: 38
       type: string
       type: string
       optional: true
       optional: true

+ 1 - 6
custom_components/tuya_local/devices/avatto_wt100_thermostat.yaml

@@ -55,12 +55,7 @@ primary_entity:
       type: string
       type: string
       mapping:
       mapping:
         - dps_val: "0"
         - dps_val: "0"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
         - dps_val: "1"
         - dps_val: "1"
           value: heating
           value: heating
     - id: 21
     - id: 21

+ 1 - 6
custom_components/tuya_local/devices/awow_th213_thermostat.yaml

@@ -61,12 +61,7 @@ primary_entity:
         - dps_val: true
         - dps_val: true
           value: heating
           value: heating
         - dps_val: false
         - dps_val: false
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
     - id: 107
     - id: 107
       type: boolean
       type: boolean
       name: unknown_107
       name: unknown_107

+ 1 - 6
custom_components/tuya_local/devices/awow_th213v2_thermostat.yaml

@@ -39,12 +39,7 @@ primary_entity:
         - dps_val: true
         - dps_val: true
           value: heating
           value: heating
         - dps_val: false
         - dps_val: false
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
     - id: 116
     - id: 116
       type: string
       type: string
       name: unknown_116
       name: unknown_116

+ 1 - 6
custom_components/tuya_local/devices/beca_bht006_thermostat_c.yaml

@@ -63,12 +63,7 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: close
         - dps_val: close
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
         - dps_val: open
         - dps_val: open
           constraint: mode
           constraint: mode
           conditions:
           conditions:

+ 1 - 6
custom_components/tuya_local/devices/beok_tgm50_thermostat.yaml

@@ -57,12 +57,7 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: "0"
         - dps_val: "0"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
         - dps_val: "1"
         - dps_val: "1"
           value: heating
           value: heating
     - id: 15
     - id: 15

+ 2 - 12
custom_components/tuya_local/devices/beok_tgr81_thermostat_c.yaml

@@ -47,19 +47,9 @@ primary_entity:
       optional: true
       optional: true
       mapping:
       mapping:
         - dps_val: close
         - dps_val: close
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
         - dps_val: open
         - dps_val: open
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: heating
-            - dps_val: false
-              value: "off"
+          value: heating
 secondary_entities:
 secondary_entities:
   - entity: number
   - entity: number
     name: Calibration offset
     name: Calibration offset

+ 1 - 6
custom_components/tuya_local/devices/beok_tol47_thermostat.yaml

@@ -49,12 +49,7 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: "0"
         - dps_val: "0"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
         - dps_val: "1"
         - dps_val: "1"
           value: heating
           value: heating
 secondary_entities:
 secondary_entities:

+ 1 - 6
custom_components/tuya_local/devices/beok_tr8b_thermostat.yaml

@@ -97,12 +97,7 @@ primary_entity:
             - dps_val: [heat, floor_heat]
             - dps_val: [heat, floor_heat]
               value: heating
               value: heating
         - dps_val: close
         - dps_val: close
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
     - id: 101
     - id: 101
       type: bitfield
       type: bitfield
       name: features
       name: features

+ 6 - 12
custom_components/tuya_local/devices/bht002_galw_thermostat.yaml

@@ -23,18 +23,12 @@ primary_entity:
       type: boolean
       type: boolean
       optional: true
       optional: true
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: false
-                  value: idle
-                - dps_val: true
-                  value: heating
-                - dps_val: null
-                  value: idle
+        - dps_val: false
+          value: idle
+        - dps_val: true
+          value: heating
+        - dps_val: null
+          value: idle
     - id: 16
     - id: 16
       name: temperature
       name: temperature
       type: integer
       type: integer

+ 10 - 16
custom_components/tuya_local/devices/bht002_gblw_thermostat.yaml

@@ -26,22 +26,16 @@ primary_entity:
       type: string
       type: string
       optional: true
       optional: true
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: Warming
-                  value: heating
-                - dps_val: Heat
-                  value: heating
-                - dps_val: "Off"
-                  value: idle
-                - dps_val: Closed
-                  value: idle
-                - dps_val: null
-                  value: idle
+        - dps_val: Warming
+          value: heating
+        - dps_val: Heat
+          value: heating
+        - dps_val: "Off"
+          value: idle
+        - dps_val: Closed
+          value: idle
+        - dps_val: null
+          value: idle
     - id: 16
     - id: 16
       name: temperature
       name: temperature
       type: integer
       type: integer

+ 0 - 5
custom_components/tuya_local/devices/brade_mc6_thermostat.yaml

@@ -39,11 +39,6 @@ primary_entity:
     - id: 3
     - id: 3
       type: string
       type: string
       name: hvac_action
       name: hvac_action
-      mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
     - id: 16
     - id: 16
       type: integer
       type: integer
       name: temperature
       name: temperature

+ 4 - 10
custom_components/tuya_local/devices/bvf_cp1_heater.yaml

@@ -31,16 +31,10 @@ primary_entity:
       optional: true
       optional: true
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: heating
-                  value: heating
-                - dps_val: standby
-                  value: idle
+        - dps_val: heating
+          value: heating
+        - dps_val: standby
+          value: idle
     - id: 16
     - id: 16
       type: integer
       type: integer
       name: temperature
       name: temperature

+ 1 - 6
custom_components/tuya_local/devices/calex_convector_heater.yaml

@@ -33,12 +33,7 @@ primary_entity:
       type: string
       type: string
       mapping:
       mapping:
         - dps_val: standby
         - dps_val: standby
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
         - dps_val: working
         - dps_val: working
           value: heating
           value: heating
     - id: 26
     - id: 26

+ 1 - 6
custom_components/tuya_local/devices/casdon_td_pro_2.yaml

@@ -91,12 +91,7 @@ primary_entity:
         - dps_val: pause
         - dps_val: pause
           value: idle
           value: idle
         - dps_val: "wait"
         - dps_val: "wait"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
 
 
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch

+ 1 - 6
custom_components/tuya_local/devices/eberg_qubo_q40hd_heatpump.yaml

@@ -104,12 +104,7 @@ primary_entity:
         - dps_val: eco
         - dps_val: eco
           value: idle
           value: idle
         - dps_val: "off"
         - dps_val: "off"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
 secondary_entities:
 secondary_entities:
   - entity: number
   - entity: number
     translation_key: timer
     translation_key: timer

+ 4 - 10
custom_components/tuya_local/devices/electric_panel_heater.yaml

@@ -42,16 +42,10 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       type: boolean
       type: boolean
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: false
-                  value: idle
-                - dps_val: true
-                  value: heating
+        - dps_val: false
+          value: idle
+        - dps_val: true
+          value: heating
     - id: 103
     - id: 103
       name: temperature_unit
       name: temperature_unit
       type: string
       type: string

+ 0 - 22
custom_components/tuya_local/devices/etop_ch7100_thermostat.yaml

@@ -36,28 +36,6 @@ primary_entity:
     - id: 3
     - id: 3
       name: hvac_action
       name: hvac_action
       type: string
       type: string
-      mapping:
-        - dps_val: cooling
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: cooling
-        - dps_val: heating
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: heating
-        - dps_val: idle
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
     - id: 16
     - id: 16
       name: thermostat_set_temp
       name: thermostat_set_temp
       type: integer
       type: integer

+ 0 - 4
custom_components/tuya_local/devices/eurom_sani_bathroom_towel_radiator.yaml

@@ -62,10 +62,6 @@ primary_entity:
               value: drying
               value: drying
         - dps_val: false
         - dps_val: false
           value: idle
           value: idle
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
     - id: 4
     - id: 4
       name: mode
       name: mode
       type: string
       type: string

+ 1 - 6
custom_components/tuya_local/devices/gardenpac_heatpump.yaml

@@ -30,12 +30,7 @@ primary_entity:
       type: string
       type: string
       mapping:
       mapping:
         - dps_val: warm
         - dps_val: warm
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
     - id: 106
     - id: 106
       name: temperature
       name: temperature
       type: integer
       type: integer

+ 6 - 12
custom_components/tuya_local/devices/hysen_hy02tp_thermostat.yaml

@@ -60,18 +60,12 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: "0allclose"
-                  value: idle
-                - dps_val: "1heaton"
-                  value: heating
-                - dps_val: "2coolon"
-                  value: cooling
+        - dps_val: "0allclose"
+          value: idle
+        - dps_val: "1heaton"
+          value: heating
+        - dps_val: "2coolon"
+          value: cooling
 secondary_entities:
 secondary_entities:
   - entity: lock
   - entity: lock
     translation_key: child_lock
     translation_key: child_lock

+ 13 - 19
custom_components/tuya_local/devices/hysen_hy08acf_thermostat.yaml

@@ -80,25 +80,19 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       type: string
       type: string
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: "0"
-                  value: idle
-                - dps_val: "1"
-                  value: heating
-                - dps_val: "2"
-                  value: cooling
-                # another variant uses long names
-                - dps_val: heatvalve
-                  value: heating
-                - dps_val: coolvalve
-                  value: cooling
-                - dps_val: closed
-                  value: idle
+        - dps_val: "0"
+          value: idle
+        - dps_val: "1"
+          value: heating
+        - dps_val: "2"
+          value: cooling
+        # another variant uses long names
+        - dps_val: heatvalve
+          value: heating
+        - dps_val: coolvalve
+          value: cooling
+        - dps_val: closed
+          value: idle
     - id: 121
     - id: 121
       name: program
       name: program
       type: integer
       type: integer

+ 4 - 10
custom_components/tuya_local/devices/hysen_hy08we2_thermostat.yaml

@@ -58,16 +58,10 @@ primary_entity:
       type: boolean
       type: boolean
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: true
-                  value: heating
-                - dps_val: false
-                  value: idle
+        - dps_val: true
+          value: heating
+        - dps_val: false
+          value: idle
     - id: 106
     - id: 106
       type: boolean
       type: boolean
       name: unknown_106
       name: unknown_106

+ 9 - 12
custom_components/tuya_local/devices/inkbird_itc306a_thermostat.yaml

@@ -20,6 +20,8 @@ primary_entity:
           value: fan_only
           value: fan_only
         - dps_val: "off"
         - dps_val: "off"
           value: "off"
           value: "off"
+          icon: "mdi:thermometer-off"
+          icon_priority: 4
     - id: 104
     - id: 104
       type: integer
       type: integer
       name: current_temperature
       name: current_temperature
@@ -85,19 +87,14 @@ primary_entity:
       type: boolean
       type: boolean
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - icon: "mdi:thermometer-off"
+        - dps_val: true
+          icon: "mdi:thermometer"
+          icon_priority: 6
+          value: heating
+        - dps_val: false
+          icon: "mdi:thermometer-off"
           icon_priority: 5
           icon_priority: 5
-          value: "off"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: "on"
-              mapping:
-                - dps_val: true
-                  icon: "mdi:thermometer"
-                  icon_priority: 6
-                  value: heating
-                - dps_val: false
-                  value: idle
+          value: idle
     - id: 116
     - id: 116
       type: integer
       type: integer
       name: current_temperature_f
       name: current_temperature_f

+ 1 - 6
custom_components/tuya_local/devices/its_45hd_heatpump.yaml

@@ -46,12 +46,7 @@ primary_entity:
         - dps_val: ERR
         - dps_val: ERR
           value: "off"
           value: "off"
         - dps_val: "NO"
         - dps_val: "NO"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
     - id: 18
     - id: 18
       type: integer
       type: integer
       name: energy_today
       name: energy_today

+ 4 - 10
custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml

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

+ 1 - 6
custom_components/tuya_local/devices/kesser_infrared_wall_heater.yaml

@@ -29,12 +29,7 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: "heating"
         - dps_val: "heating"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
         - dps_val: "standby"
         - dps_val: "standby"
           value: heating
           value: heating
 secondary_entities:
 secondary_entities:

+ 4 - 10
custom_components/tuya_local/devices/kkmoon_thermostat.yaml

@@ -26,16 +26,10 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: open
-                  value: heating
-                - dps_val: close
-                  value: idle
+        - dps_val: open
+          value: heating
+        - dps_val: close
+          value: idle
     - id: 16
     - id: 16
       type: integer
       type: integer
       name: temperature
       name: temperature

+ 2 - 12
custom_components/tuya_local/devices/ledlux_thermostat.yaml

@@ -45,19 +45,9 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: true
         - dps_val: true
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: heating
+          value: heating
         - dps_val: false
         - dps_val: false
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
     - id: 106
     - id: 106
       type: boolean
       type: boolean
       name: unknown_106
       name: unknown_106

+ 1 - 6
custom_components/tuya_local/devices/madimack_heatpump.yaml

@@ -37,12 +37,7 @@ primary_entity:
           value: cooling
           value: cooling
         - dps_val: "2"
         - dps_val: "2"
           value: cooling
           value: cooling
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+        - value: idle
     - id: 106
     - id: 106
       name: temperature
       name: temperature
       type: integer
       type: integer

+ 0 - 8
custom_components/tuya_local/devices/me80_thermostat.yaml

@@ -99,16 +99,8 @@ primary_entity:
       mapping:
       mapping:
         - dps_val: close
         - dps_val: close
           value: idle
           value: idle
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
         - dps_val: open
         - dps_val: open
           value: heating
           value: heating
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
     - id: 104
     - id: 104
       type: string
       type: string
       name: program
       name: program

+ 4 - 10
custom_components/tuya_local/devices/mellerware_comfy_radiator.yaml

@@ -70,16 +70,10 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: working
-                  value: heating
-                - dps_val: standby
-                  value: idle
+        - dps_val: working
+          value: heating
+        - dps_val: standby
+          value: idle
     - id: 26
     - id: 26
       type: string
       type: string
       optional: true
       optional: true

+ 2 - 12
custom_components/tuya_local/devices/minco_mh1823d_thermostat.yaml

@@ -33,19 +33,9 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: stop
         - dps_val: stop
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
         - dps_val: start
         - dps_val: start
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: heating
+          value: heating
     - id: 12
     - id: 12
       type: boolean
       type: boolean
       name: unknown_12
       name: unknown_12

+ 7 - 14
custom_components/tuya_local/devices/multi_leaf_dy_107_thermostat.yaml

@@ -14,6 +14,8 @@ primary_entity:
           value: heat
           value: heat
         - dps_val: false
         - dps_val: false
           value: "off"
           value: "off"
+          icon: "mdi:radiator-disabled"
+          icon_priority: 1
     - id: 2
     - id: 2
       name: preset_mode
       name: preset_mode
       type: string
       type: string
@@ -45,21 +47,12 @@ primary_entity:
       mapping:
       mapping:
         - dps_val: close
         - dps_val: close
           icon: "mdi:radiator-disabled"
           icon: "mdi:radiator-disabled"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          icon_priority: 2
+          value: idle
         - dps_val: open
         - dps_val: open
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              icon: "mdi:radiator"
-              value: heating
-            - dps_val: false
-              icon: "mdi:radiator-disabled"
-              value: "off"
+          icon: "mdi:radiator"
+          icon_priority: 2
+          value: heating
 secondary_entities:
 secondary_entities:
   - entity: number
   - entity: number
     name: Calibration offset
     name: Calibration offset

+ 4 - 12
custom_components/tuya_local/devices/nybro_heater.yaml

@@ -31,22 +31,14 @@ primary_entity:
           value: boost
           value: boost
         - dps_val: af
         - dps_val: af
           value: away
           value: away
-    - id: 1
+    - id: 101
       type: boolean
       type: boolean
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: false
         - dps_val: false
-          value: "off"
-        - constraint: heating
-          conditions:
-            - dps_val: false
-              value: idle
-            - dps_val: true
-              value: heating
-    - id: 101
-      type: boolean
-      name: heating
-      hidden: true
+          value: idle
+        - dps_val: true
+          value: heating
 secondary_entities:
 secondary_entities:
   - entity: binary_sensor
   - entity: binary_sensor
     class: problem
     class: problem

+ 1 - 6
custom_components/tuya_local/devices/poolex_q7_heatpump.yaml

@@ -75,12 +75,7 @@ primary_entity:
           value: heating
           value: heating
         - dps_val: cooling
         - dps_val: cooling
           value: cooling
           value: cooling
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+        - value: idle
     - id: 13
     - id: 13
       type: string
       type: string
       name: temperature_unit
       name: temperature_unit

+ 4 - 10
custom_components/tuya_local/devices/qh_gd_elegant_heater.yaml

@@ -36,16 +36,10 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: heating
-                  value: heating
-                - dps_val: standby
-                  value: idle
+        - dps_val: heating
+          value: heating
+        - dps_val: standby
+          value: idle
 secondary_entities:
 secondary_entities:
   - entity: lock
   - entity: lock
     translation_key: child_lock
     translation_key: child_lock

+ 2 - 11
custom_components/tuya_local/devices/salcar_t9w_thermostat.yaml

@@ -56,18 +56,9 @@ primary_entity:
       type: string
       type: string
       mapping:
       mapping:
         - dps_val: open
         - dps_val: open
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: heating
+          value: heating
         - dps_val: close
         - dps_val: close
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: idle
+          value: idle
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch
     translation_key: anti_frost
     translation_key: anti_frost

+ 4 - 10
custom_components/tuya_local/devices/semptec_zx7007_heater.yaml

@@ -28,16 +28,10 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: stop
-                  value: idle
-                - dps_val: heating
-                  value: heating
+        - dps_val: stop
+          value: idle
+        - dps_val: heating
+          value: heating
 secondary_entities:
 secondary_entities:
   - entity: select
   - entity: select
     translation_key: timer
     translation_key: timer

+ 4 - 10
custom_components/tuya_local/devices/taurus_agadir_heater.yaml

@@ -33,16 +33,10 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              mapping:
-                - dps_val: working
-                  value: heating
-                - dps_val: standby
-                  value: idle
+        - dps_val: working
+          value: heating
+        - dps_val: standby
+          value: idle
     - id: 101
     - id: 101
       type: string
       type: string
       name: fan_mode
       name: fan_mode

+ 4 - 10
custom_components/tuya_local/devices/valehaus_syzn119_tow_w.yaml

@@ -31,16 +31,10 @@ primary_entity:
       type: string
       type: string
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
-        - constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              mapping:
-                - dps_val: heating
-                  value: heating
-                - dps_val: standby
-                  value: idle
-            - dps_val: false
-              value: "off"
+        - dps_val: heating
+          value: heating
+        - dps_val: standby
+          value: idle
 secondary_entities:
 secondary_entities:
   - entity: select
   - entity: select
     translation_key: timer
     translation_key: timer

+ 1 - 1
custom_components/tuya_local/devices/vine_tj550_thermostat.yaml

@@ -26,7 +26,7 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: aux_heating
         - dps_val: aux_heating
-          value: heating
+          value: preheating
         - dps_val: em_heating
         - dps_val: em_heating
           value: heating
           value: heating
         - dps_val: dehumidifier
         - dps_val: dehumidifier

+ 2 - 12
custom_components/tuya_local/devices/wetair_wch750_heater.yaml

@@ -38,19 +38,9 @@ primary_entity:
       name: hvac_action
       name: hvac_action
       mapping:
       mapping:
         - dps_val: heating
         - dps_val: heating
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: heating
+          value: heating
         - dps_val: warm
         - dps_val: warm
-          constraint: hvac_mode
-          conditions:
-            - dps_val: false
-              value: "off"
-            - dps_val: true
-              value: idle
+          value: idle
     - id: 21
     - id: 21
       type: integer
       type: integer
       name: unknown_21
       name: unknown_21