Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX switchoff reasons #186

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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