Răsfoiți Sursa

GardenPAC: add min/max temp dps based on config similarity with madimack.

Other dps seem to match between these two, so these two should also match.
Sample data seems to support this, except max is 40, while spec from manual had 45, but that was actually the same for Madimack also.

Based on info in #159
Jason Rumney 3 ani în urmă
părinte
comite
b2cba6d18d

+ 2 - 2
custom_components/tuya_local/devices/gardenpac_heatpump.yaml

@@ -57,10 +57,10 @@ primary_entity:
         max: 45
         max: 45
     - id: 107
     - id: 107
       type: integer
       type: integer
-      name: unknown_107
+      name: min_temperature
     - id: 108
     - id: 108
       type: integer
       type: integer
-      name: unknown_108
+      name: max_temperature
     - id: 115
     - id: 115
       type: integer
       type: integer
       name: unknown_115
       name: unknown_115

+ 1 - 1
tests/const.py

@@ -153,7 +153,7 @@ GARDENPAC_HEATPUMP_PAYLOAD = {
     "105": "warm",
     "105": "warm",
     "106": 30,
     "106": 30,
     "107": 18,
     "107": 18,
-    "108": 40,
+    "108": 45,
     "115": 0,
     "115": 0,
     "116": 0,
     "116": 0,
     "117": True,
     "117": True,

+ 4 - 6
tests/devices/test_gardenpac_heatpump.py

@@ -27,8 +27,8 @@ UNITS_DPS = "103"
 POWERLEVEL_DPS = "104"
 POWERLEVEL_DPS = "104"
 OPMODE_DPS = "105"
 OPMODE_DPS = "105"
 TEMPERATURE_DPS = "106"
 TEMPERATURE_DPS = "106"
-UNKNOWN107_DPS = "107"
-UNKNOWN108_DPS = "108"
+MINTEMP_DPS = "107"
+MAXTEMP_DPS = "108"
 UNKNOWN115_DPS = "115"
 UNKNOWN115_DPS = "115"
 UNKNOWN116_DPS = "116"
 UNKNOWN116_DPS = "116"
 PRESET_DPS = "117"
 PRESET_DPS = "117"
@@ -80,10 +80,12 @@ class TestGardenPACPoolHeatpump(
 
 
     def test_minimum_fahrenheit_temperature(self):
     def test_minimum_fahrenheit_temperature(self):
         self.dps[UNITS_DPS] = False
         self.dps[UNITS_DPS] = False
+        self.dps[MINTEMP_DPS] = 60
         self.assertEqual(self.subject.min_temp, 60)
         self.assertEqual(self.subject.min_temp, 60)
 
 
     def test_maximum_fahrenheit_temperature(self):
     def test_maximum_fahrenheit_temperature(self):
         self.dps[UNITS_DPS] = False
         self.dps[UNITS_DPS] = False
+        self.dps[MAXTEMP_DPS] = 115
         self.assertEqual(self.subject.max_temp, 115)
         self.assertEqual(self.subject.max_temp, 115)
 
 
     def test_current_temperature(self):
     def test_current_temperature(self):
@@ -153,16 +155,12 @@ class TestGardenPACPoolHeatpump(
 
 
     def test_extra_state_attributes(self):
     def test_extra_state_attributes(self):
         self.dps[POWERLEVEL_DPS] = 50
         self.dps[POWERLEVEL_DPS] = 50
-        self.dps[UNKNOWN107_DPS] = 1
-        self.dps[UNKNOWN108_DPS] = 2
         self.dps[UNKNOWN115_DPS] = 3
         self.dps[UNKNOWN115_DPS] = 3
         self.dps[UNKNOWN116_DPS] = 4
         self.dps[UNKNOWN116_DPS] = 4
         self.assertDictEqual(
         self.assertDictEqual(
             self.subject.extra_state_attributes,
             self.subject.extra_state_attributes,
             {
             {
                 "power_level": 50,
                 "power_level": 50,
-                "unknown_107": 1,
-                "unknown_108": 2,
                 "unknown_115": 3,
                 "unknown_115": 3,
                 "unknown_116": 4,
                 "unknown_116": 4,
             },
             },