浏览代码

fix (arcelik_ahphmm_comboheatpump): handle off edge cases

When in hot_water mode, the water_heater needs to be turned off by
the power switch. The redirect in this case hides the available modes,
since the other modes are filtered out to avoid affecting the climate mode.
Add some dummy conditions to make the options appear in the list.

In climate mode, "off" was only available when hot water was on, similarly
because "off" in that case requires the use of the power switch. Make
that available with a redirection also.

The reverse cases of turning the device on from power off mode needs to be
done from the main power switch, as the other entities are disabled to
avoid needing to send two dps at once to switch modes out of "off".

PR #4200
Jason Rumney 1 月之前
父节点
当前提交
a46f3a0e3b
共有 1 个文件被更改,包括 17 次插入2 次删除
  1. 17 2
      custom_components/tuya_local/devices/arcelik_ahphmm_comboheatpump.yaml

+ 17 - 2
custom_components/tuya_local/devices/arcelik_ahphmm_comboheatpump.yaml

@@ -101,6 +101,17 @@ entities:
           - dps_val: auto_dhw
           - dps_val: auto_dhw
             value: heat_cool
             value: heat_cool
             available: water_on
             available: water_on
+          - value: "off"
+            available: water_off
+            value_redirect: power
+      - id: 1
+        type: boolean
+        name: power
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat_cool
       - id: 115
       - id: 115
         type: boolean
         type: boolean
         name: hvac_action
         name: hvac_action
@@ -142,8 +153,12 @@ entities:
         name: operation_mode
         name: operation_mode
         mapping:
         mapping:
           - dps_val: hot_water
           - dps_val: hot_water
-            value_redirect: actual_power
+            value_redirect: power
             available: air_off
             available: air_off
+            # dummy conditions to make the values known to HA
+            conditions:
+              - value: "off"
+              - value: heat_pump
           - dps_val: cool
           - dps_val: cool
             value: "off"
             value: "off"
             available: air_cool
             available: air_cool
@@ -164,7 +179,7 @@ entities:
             available: air_auto
             available: air_auto
       - id: 1
       - id: 1
         type: boolean
         type: boolean
-        name: actual_power
+        name: power
         hidden: true
         hidden: true
         mapping:
         mapping:
           - dps_val: false
           - dps_val: false