Sfoglia il codice sorgente

ElectriQ Airflex: fix mapping of fan preset to HVAC Mode.

- add Dry mode back in to tests and move Fan to correct location in list.

Corrections to PR #205 for issue #175
Jason Rumney 3 anni fa
parent
commit
f56cae45b7

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

@@ -27,7 +27,7 @@ primary_entity:
               value: dry
               icon: "mdi:water"
             - dps_val: "5" # fan
-              value: heat_cool
+              value: fan_only
               icon: "mdi:fan"
     - id: 2
       type: integer

+ 3 - 2
tests/devices/test_electriq_airflex15w_heatpump.py

@@ -115,11 +115,11 @@ class TestElectriqAirflex15WHeatpump(
         self.dps[HVACMODE_DPS] = "1"
         self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
         self.dps[HVACMODE_DPS] = "3"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.FAN_ONLY)
+        self.assertEqual(self.subject.hvac_mode, HVACMode.DRY)
         self.dps[HVACMODE_DPS] = "0"
         self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT_COOL)
         self.dps[HVACMODE_DPS] = "5"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT_COOL)
+        self.assertEqual(self.subject.hvac_mode, HVACMode.FAN_ONLY)
         self.dps[POWER_DPS] = False
         self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
 
@@ -131,6 +131,7 @@ class TestElectriqAirflex15WHeatpump(
                 HVACMode.HEAT,
                 HVACMode.HEAT_COOL,
                 HVACMode.COOL,
+                HVACMode.DRY,
                 HVACMode.FAN_ONLY,
             ],
         )