From c50adb0fc5e5dbb1105dbd3805c45ad11fcdb6ce Mon Sep 17 00:00:00 2001 From: Gerd Wachsmuth Date: Thu, 31 Oct 2024 13:05:43 +0100 Subject: [PATCH] FIX switchoff reasons Fixes #185 --- luxtronik/datatypes.py | 20 +++++++++++++++++--- tests/test_datatypes.py | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/luxtronik/datatypes.py b/luxtronik/datatypes.py index d8f7435..c7ee504 100755 --- a/luxtronik/datatypes.py +++ b/luxtronik/datatypes.py @@ -666,17 +666,31 @@ class SwitchoffFile(SelectionBase): datatype_class = "selection" codes = { - 1: "heatpump error", - 2: "system error", + 0: "heatpump error", + 1: "system error", + 2: "operation mode second heat generator", 3: "evu lock", - 4: "operation mode second heat generator", 5: "air defrost", 6: "maximal usage temperature", 7: "minimal usage temperature", 8: "lower usage limit", 9: "no request", + 10 : "external energy source", 11: "flow rate", + 12 : "low pressure pause", + 13 : "superheating pause", + 14 : "inverter pause", + 15 : "desuperheater pause", + 16 : "operation mode for switching over", + 17 : "other shutdown", + 18 : "min.flow cooling", 19: "PV max", + 20 : "hot gas pause", + 21 : "overheating hot gas pause", + 22 : "no request", + 23 : "min. heat source out cooling", + 24 : "LPC", + 25 : "restart", } diff --git a/tests/test_datatypes.py b/tests/test_datatypes.py index 95ca473..2643c36 100644 --- a/tests/test_datatypes.py +++ b/tests/test_datatypes.py @@ -1009,13 +1009,13 @@ def test_init(self): assert a.name == "switchoff_file" assert a.datatype_class == "selection" assert a.datatype_unit is None - assert len(a.codes) == 11 + assert len(a.codes) == 25 def test_options(self): """Test cases for options property""" a = SwitchoffFile("") - assert len(a.options()) == 11 + assert len(a.options()) == 25 assert a.options() == list(a.codes.values())