ソースを参照

Add a test for detection of Remora pool heatpump.

Jason Rumney 4 年 前
コミット
4f74917f9d
2 ファイル変更8 行追加0 行削除
  1. 2 0
      tests/const.py
  2. 6 0
      tests/test_device_config.py

+ 2 - 0
tests/const.py

@@ -107,3 +107,5 @@ PURLINE_M100_HEATER_PAYLOAD = {
     "101": False,
     "102": False,
 }
+
+REMORA_HEATPUMP_PAYLOAD = {"1": True, "2": 30, "3": 28, "4": "heat", "9": 0}

+ 6 - 0
tests/test_device_config.py

@@ -37,6 +37,7 @@ from .const import (
     KOGAN_SOCKET_PAYLOAD,
     KOGAN_SOCKET_PAYLOAD2,
     PURLINE_M100_HEATER_PAYLOAD,
+    REMORA_HEATPUMP_PAYLOAD,
 )
 
 
@@ -195,3 +196,8 @@ class TestDeviceConfig(unittest.TestCase):
             CONF_TYPE_PURLINE_M100_HEATER,
             "PurlineM100Heater",
         )
+
+    # Non-legacy devices start here.
+    def test_remora_heatpump_detection(self):
+        """Test that Remora heatpump can be detected from its sample payload."""
+        self._test_detect(REMORA_HEATPUMP_PAYLOAD, "remora_heatpump", None)