Skip to content

Commit

Permalink
FIX switchoff reasons
Browse files Browse the repository at this point in the history
Fixes #185
  • Loading branch information
gerw authored and Bouni committed Nov 1, 2024
1 parent abd4752 commit f5c48bf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
20 changes: 17 additions & 3 deletions luxtronik/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}


Expand Down
4 changes: 2 additions & 2 deletions tests/test_datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())


Expand Down

0 comments on commit f5c48bf

Please sign in to comment.