Skip to content

Commit

Permalink
When passively cooling, the requested temperature is incorrect:
Browse files Browse the repository at this point in the history
Fixes #101
  • Loading branch information
sHedC committed Jun 14, 2023
1 parent e6246b4 commit 958c700
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
16 changes: 15 additions & 1 deletion masterthermconnect/datamapread.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,21 @@
"aux_heater_1": [bool, "D_6"],
"aux_heater_2": [bool, "D_7"],
"outside_temp": [float, "A_3"],
"requested_temp": [float, "A_5"],
"requested_temp_old": [float, "A_5"],
"requested_temp": [ # Cooling temp does not show in A_5
Special(str, Special.FORMULA),
[
"{0} if ({2} or {3} or {4} or {5}) else {1}",
[
[float, "A_5"], # 0 - Main Requested Temp
[float, "A_212"], # 1 - Heating/Cooling Temp
[bool, "D_66"], # 2 - Hot Water
[bool, "D_43"], # 3 - Pool
[bool, "D_6"], # 4 - Aux Heater 1
[bool, "D_7"], # 5 - Aux Heater 2
],
],
],
"actual_temp": [float, "A_1"],
"dewp_control": [bool, "D_196"],
"high_tariff_control": [
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/newapi/pumpdata_10021_2_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"A_209": "50.0",
"A_210": "21.0",
"A_211": "22.2",
"A_212": "20.1",
"A_212": "15.1",
"A_213": "30.0",
"A_214": "50.0",
"A_215": "20.0",
Expand Down
3 changes: 3 additions & 0 deletions tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ async def test_operating_mode_cooling():
data = controller.get_device_data("10021", "2")

assert data["operating_mode"] == "cooling"
assert data["requested_temp"] == 15.1


async def test_operating_mode_heating():
Expand Down Expand Up @@ -231,6 +232,7 @@ async def test_operating_mode_heating():
data = controller.get_device_data("1234", "1")

assert data["operating_mode"] == "heating"
assert data["requested_temp"] == 34.7


async def test_operating_mode_dhw():
Expand Down Expand Up @@ -260,6 +262,7 @@ async def test_operating_mode_dhw():
data = controller.get_device_data("0002", "1")

assert data["operating_mode"] == "dhw"
assert data["requested_temp"] == 45.0


async def test_new_api_get_info_data():
Expand Down

0 comments on commit 958c700

Please sign in to comment.