Przeglądaj źródła

Poolex Q-line: use heat_cool rather than fan_only for "mute" mode.

Based on the comment "all are in grey", fan_only may be disabling the temperature setting, which would not be good.
Also, add a catch all default to avoid the reported error "Unrecognized HVAC Mode of True ignored".  Whether there is another missing mode, or there is just a period during startup when the mode is unavailble, this should avoid the issue.

Issue #166
Jason Rumney 3 lat temu
rodzic
commit
b2a0ea60a6

+ 2 - 1
custom_components/tuya_local/devices/poolex_qline_heatpump.yaml

@@ -18,7 +18,8 @@ primary_entity:
             - dps_val: heating
               value: heat
             - dps_val: mute
-              value: fan_only
+              value: heat_cool
+            - value: heat_cool
     - id: 2
       name: heating_mode
       hidden: true

+ 3 - 3
tests/devices/test_poolex_qline_heatpump.py

@@ -78,7 +78,7 @@ class TestPoolexSilverlineHeatpump(
         self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
 
         self.dps[MODE_DPS] = "mute"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.FAN_ONLY)
+        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT_COOL)
 
         self.dps[HVACMODE_DPS] = False
         self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
@@ -86,7 +86,7 @@ class TestPoolexSilverlineHeatpump(
     def test_hvac_modes(self):
         self.assertCountEqual(
             self.subject.hvac_modes,
-            [HVACMode.OFF, HVACMode.COOL, HVACMode.HEAT, HVACMode.FAN_ONLY],
+            [HVACMode.OFF, HVACMode.COOL, HVACMode.HEAT, HVACMode.HEAT_COOL],
         )
 
     async def test_hvac_mode_heat(self):
@@ -105,7 +105,7 @@ class TestPoolexSilverlineHeatpump(
         async with assert_device_properties_set(
             self.subject._device, {HVACMODE_DPS: True, MODE_DPS: "mute"}
         ):
-            await self.subject.async_set_hvac_mode(HVACMode.FAN_ONLY)
+            await self.subject.async_set_hvac_mode(HVACMode.HEAT_COOL)
 
     async def test_turn_off(self):
         async with assert_device_properties_set(