Explorar o código

Make test payloads for switches more robust.

Since a mock device is used in the entity tests, we need to make sure the
dps ids that we will access exist in the test payload.
Jason Rumney %!s(int64=5) %!d(string=hai) anos
pai
achega
fb72ce582d
Modificáronse 1 ficheiros con 20 adicións e 2 borrados
  1. 20 2
      tests/const.py

+ 20 - 2
tests/const.py

@@ -45,6 +45,24 @@ DEHUMIDIFIER_PAYLOAD = {
 
 FAN_PAYLOAD = {"1": False, "2": "12", "3": "normal", "8": True, "11": "0", "101": False}
 
-KOGAN_SOCKET_PAYLOAD = {"1": True, "2": 0, "4": 200, "5": 460, "6": 2300}
+KOGAN_SOCKET_PAYLOAD = {
+    "1": True,
+    "2": 0,
+    "4": 200,
+    "5": 460,
+    "6": 2300,
+    "18": None,
+    "19": None,
+    "20": None,
+}
 
-KOGAN_SOCKET_PAYLOAD2 = {"1": True, "2": 0, "18": 200, "19": 460, "20": 2300}
+KOGAN_SOCKET_PAYLOAD2 = {
+    "1": True,
+    "2": 0,
+    "4": None,
+    "5": None,
+    "6": None,
+    "18": 200,
+    "19": 460,
+    "20": 2300,
+}