Skip to content

Commit

Permalink
Use Winter/ Summer Logic for Cooling
Browse files Browse the repository at this point in the history
  • Loading branch information
sHedC committed Oct 25, 2023
1 parent 98f3d32 commit 875a141
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions masterthermconnect/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,14 @@ def main(argv=None) -> int:
except SystemExit as ex:
return ex.code

# Check we have any arguments
try:
if not args.command:
return -1
except Exception:
print("usage: masterthermconnect -h")
return 0

# If User/ Pass is not provided then get from the command line.
login_user = input("User: ") if args.user is None else args.user
login_pass = getpass.getpass() if args.password is None else args.password
Expand Down
8 changes: 4 additions & 4 deletions masterthermconnect/datamapread.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@
"'dhw' if {0} else "
"'pool' if {1} else "
"'aux_heater' if not ({2} or {3}) and ({4} or {5}) else "
"'cooling_dpc' if {6} and ({7} or {12} or {13}) else "
"'cooling' if {7} or {12} or {13} else "
"'heating' if {8} or {9} or {10} or {11} else "
"'heating' if {13} and ({8} or {9} or {10} or {11}) else "
"'cooling_dpc' if {6} and ({7} or {12} or {8} or {9} or {10} or {11}) else "
"'cooling' if {7} or {12} or {8} or {9} or {10} or {11} else "
"'idle'"
),
[
Expand All @@ -315,7 +315,7 @@
[bool, "D_10"], # 10 - Ciculation
[bool, "D_8"], # 11 - Fan
[bool, "D_277"], # 12 - Cooling Pump On
[bool, "D_193"], # 13 - Requested Mode
[bool, "D_24"], # 13 - Operation Mode 1=Winter, 0=Summer
],
],
],
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/newapi/pumpdata_10021_2_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@
"D_21": "0",
"D_22": "0",
"D_23": "1",
"D_24": "1",
"D_24": "0",
"D_25": "1",
"D_26": "0",
"D_27": "0",
Expand Down Expand Up @@ -1054,7 +1054,7 @@
"I_47": "5",
"I_48": "1",
"I_49": "0",
"I_50": "1",
"I_50": "2",
"I_51": "0",
"I_52": "0",
"I_53": "60",
Expand Down

0 comments on commit 875a141

Please sign in to comment.