Jelajahi Sumber

Documentation for recent changes.

Madimack: add water flow sensor (comment on #11)
Jason Rumney 3 tahun lalu
induk
melakukan
ceeb11e714

+ 4 - 0
ACKNOWLEDGEMENTS.md

@@ -87,3 +87,7 @@ Further device support has been made with the assistance of users.  Please consi
 - [daitj](https://github.com/daitj) for contributing support for Wilfa Haze humidifier.
 - [Utopia69](https://github.com/Utopia69) for providing additional info on his Fairland IPH45 heatpump (matching Madimack)
 - [Seopgroenten](https://github.com/Soepgronten) for assistance with W'eau pool heatpumps.
+- [choppedpork](https://github.com/choppedpork) for contributing support for QS Wifi curtain modules.
+- [Swiftnesses](https://github.com/Swiftnesses) for assistance with Devola patio heaters.
+- [odeBuXTeR](https://github.com/odeBuXTeR) for contributing support for Poolex Q-line pool heatpumps.
+- [peterforeman](https:github.com/peterforeman) for assistance with improving Fairland/Madimack support.

+ 4 - 1
README.md

@@ -45,6 +45,7 @@ the device will not work despite being listed below.
 - Nedis convection heater - WIFIHTPL20F models
 - Ecostrad Accent iQ heating panels
 - Ecostrad iQ Ceramic radiators
+- Devola Patio heater
 
 ### Air Conditioners / Heatpumps
 
@@ -65,7 +66,7 @@ the device will not work despite being listed below.
 - Madimack(model unknown) pool heatpump (seems to match Fairland IPH45 as well)
 - Remora pool heatpump
 - BWT FI 45 heatpump
-- Poolex Silverline and Vertigo heatpump
+- Poolex Silverline, Q-line and Vertigo heatpumps
 - IPS Pro Pool-Systems Heatpump (seems to match Fairland Inver-X as well)
 - W'eau Pool Heatpump
 
@@ -140,6 +141,8 @@ the device will not work despite being listed below.
   _confirmed working with Kogan single smartplug with USB and Rillpac smartplugs_
 - Generic Smartplug with more advanced energy monitoring
   _confirmed working with CBE smartplugs_
+- Generic Smartplug with some additional encoded schedule info.
+  _confirmed working as a simple switch and timer with Kashimura KJ-173_
 - Mirabella Genio Smart plug with USB
 - Grid Connect double outlet with Energy Monitoring, Master and Individual switches and Child Lock.
 - DIGOO DG-SP202 dual smartplug with energy monitoring and timers.

+ 19 - 2
custom_components/tuya_local/devices/madimack_heatpump.yaml

@@ -58,8 +58,13 @@ primary_entity:
       type: integer
       name: max_temperature
     - id: 115
-      type: integer
-      name: unknown_115
+      type: bitfield
+      name: error
+      mapping:
+        - dps_val: 0
+          value: OK
+        - dps_val: 4
+          value: Water Flow Protection
     - id: 116
       type: integer
       name: unknown_116
@@ -123,6 +128,18 @@ secondary_entities:
             value: F
           - dps_val: true
             value: C
+  - entity: binary_sensor
+    name: Water Flow
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 115
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 4
+            value: true
+          - value: false
   - entity: sensor
     category: diagnostic
     class: temperature

+ 13 - 3
tests/devices/test_madimack_heatpump.py

@@ -1,3 +1,4 @@
+from homeassistant.components.binary_sensor import DEVICE_CLASS_PROBLEM
 from homeassistant.components.climate.const import (
     CURRENT_HVAC_HEAT,
     CURRENT_HVAC_IDLE,
@@ -17,6 +18,7 @@ from homeassistant.const import (
 
 from ..const import MADIMACK_HEATPUMP_PAYLOAD
 from ..helpers import assert_device_properties_set
+from ..mixins.binary_sensor import BasicBinarySensorTests
 from ..mixins.climate import TargetTemperatureTests
 from ..mixins.sensor import MultiSensorTests
 from .base_device_tests import TuyaDeviceTestCase
@@ -29,7 +31,7 @@ OPMODE_DPS = "105"
 TEMPERATURE_DPS = "106"
 MINTEMP_DPS = "107"
 MAXTEMP_DPS = "108"
-UNKNOWN115_DPS = "115"
+ERROR_DPS = "115"
 UNKNOWN116_DPS = "116"
 UNKNOWN118_DPS = "118"
 COIL_DPS = "120"
@@ -50,6 +52,7 @@ PRESET_DPS = "117"
 
 
 class TestMadimackPoolHeatpump(
+    BasicBinarySensorTests,
     MultiSensorTests,
     TargetTemperatureTests,
     TuyaDeviceTestCase,
@@ -65,6 +68,12 @@ class TestMadimackPoolHeatpump(
             min=18,
             max=45,
         )
+        self.setUpBasicBinarySensor(
+            ERROR_DPS,
+            self.entities.get("binary_sensor_water_flow"),
+            device_class=DEVICE_CLASS_PROBLEM,
+            testdata=(4, 0),
+        )
         self.setUpMultiSensors(
             [
                 {
@@ -123,6 +132,7 @@ class TestMadimackPoolHeatpump(
                 "sensor_eev_opening",
                 "sensor_exhaust_gas_temperature",
                 "sensor_fan_speed",
+                "binary_sensor_water_flow",
             ]
         )
 
@@ -221,7 +231,7 @@ class TestMadimackPoolHeatpump(
         self.assertEqual(self.subject.hvac_action, CURRENT_HVAC_OFF)
 
     def test_extra_state_attributes(self):
-        self.dps[UNKNOWN115_DPS] = 3
+        self.dps[ERROR_DPS] = 4
         self.dps[UNKNOWN116_DPS] = 4
         self.dps[UNKNOWN118_DPS] = 5
         self.dps[UNKNOWN126_DPS] = 10
@@ -234,7 +244,7 @@ class TestMadimackPoolHeatpump(
         self.assertDictEqual(
             self.subject.extra_state_attributes,
             {
-                "unknown_115": 3,
+                "error": "Water Flow Protection",
                 "unknown_116": 4,
                 "unknown_118": 5,
                 "unknown_126": 10,