Bläddra i källkod

Eberg Qubo: Modify tests according to last change.

- use correct icon for dehumidify mode
- bump version
Jason Rumney 3 år sedan
förälder
incheckning
d2e6c6fd73

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -111,3 +111,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [jamiergrs](https://github.com/jamiergrs) for assistance supporting Orion Grid Connect outdoor sirens.
 - [myhomeiot](https://github.com/myhomeiot) for contributing support for Bresser 7-in-1 Weather Station.
 - [Condorello](https://github.com/Condorello) for assistance supporting Inkbird sous vide cookers.
+- [sebastiangebosz](https://github.com/sebastiangebosz) for contributing improvements to Eberg Qubo heatpumps.

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

@@ -51,7 +51,7 @@ primary_entity:
             - dps_val: true
               value: heat
         - dps_val: dehumidify
-          icon: "mdi:fan"
+          icon: "mdi:water-percent"
           icon_priority: 2
           constraint: power
           conditions:

+ 1 - 1
custom_components/tuya_local/manifest.json

@@ -2,7 +2,7 @@
     "domain": "tuya_local",
     "iot_class": "local_polling",
     "name": "Tuya Local",
-    "version": "0.18.2",
+    "version": "0.18.3",
     "documentation": "https://github.com/make-all/tuya-local",
     "issue_tracker": "https://github.com/make-all/tuya-local/issues",
     "dependencies": [],

+ 6 - 0
tests/devices/test_eberg_qubo_q40hd_heatpump.py

@@ -73,6 +73,8 @@ class TestEbergQuboQ40HDHeatpump(
         self.assertEqual(self.subject.icon, "mdi:snowflake")
         self.dps[HVACMODE_DPS] = "hot"
         self.assertEqual(self.subject.icon, "mdi:fire")
+        self.dps[HVACMODE_DPS] = "dehumidify"
+        self.assertEqual(self.subject.icon, "mdi:water-percent")
         self.dps[POWER_DPS] = False
         self.assertEqual(self.subject.icon, "mdi:hvac-off")
 
@@ -102,6 +104,9 @@ class TestEbergQuboQ40HDHeatpump(
         self.dps[HVACMODE_DPS] = "hot"
         self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
 
+        self.dps[HVACMODE_DPS] = "dehumidify"
+        self.assertEqual(self.subject.hvac_mode, HVACMode.DRY)
+
         self.dps[HVACMODE_DPS] = "cold"
         self.dps[POWER_DPS] = False
         self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
@@ -112,6 +117,7 @@ class TestEbergQuboQ40HDHeatpump(
             [
                 HVACMode.OFF,
                 HVACMode.COOL,
+                HVACMode.DRY,
                 HVACMode.HEAT,
             ],
         )

+ 2 - 10
tests/test_device_config.py

@@ -26,20 +26,12 @@ class TestDeviceConfig(IsolatedAsyncioTestCase):
         self.assertTrue(found)
 
     def test_config_files_parse(self):
-        for cfg in available_configs():
-            parsed = TuyaDeviceConfig(cfg)
-            self.assertIsNotNone(parsed.name)
-
-    def test_config_files_have_legacy_link(self):
         """
-        Initially, we require a link between the new style config, and the old
-        classes so we can transition over to the new config.  When the
-        transition is complete, we will drop the requirement, as new devices
-        will only be added as config files.
+        All configs should be parsable and have at least a name and primary entity.
         """
         for cfg in available_configs():
             parsed = TuyaDeviceConfig(cfg)
-            self.assertIsNotNone(parsed.legacy_type)
+            self.assertIsNotNone(parsed.name)
             self.assertIsNotNone(parsed.primary_entity)
 
     # Most of the device_config functionality is exercised during testing of