Skip to content

Commit d5a219b

Browse files
author
Vilppu Vuorinen
committed
Use fixed ATW tank temperature min
1 parent 2391c38 commit d5a219b

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
- Use fixed tank temperature minimum.
810

911
## [2.5.1] - 2020-04-05
1012
### Fixed

pymelcloud/atw_device.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -258,20 +258,10 @@ def target_tank_temperature(self) -> Optional[float]:
258258
def target_tank_temperature_min(self) -> Optional[float]:
259259
"""Return minimum target tank water temperature.
260260
261-
The minimum value is not readily available from the API response.
262-
MinSetTemperature initially looks like a good candidate, but the values of
263-
MinSetTemperature and MaxSetTemperature are both 10°C lower than the values
264-
displayed in MELCloud UI.
265-
266-
Given these circumstances the minimum is calculated by subtracting the
267-
difference of MaxSetTemperature and MinSetTemperature from the
268-
MaxTankTemperature.
261+
The value does not seem to be available on the API. A fixed value is used
262+
instead.
269263
"""
270-
device = self._device_conf.get("Device", {})
271-
return device.get("MaxTankTemperature", 60.0) - (
272-
device.get("MaxSetTemperature", 50.0)
273-
- device.get("MinSetTemperature", 30.0)
274-
)
264+
return 40.0
275265

276266
@property
277267
def target_tank_temperature_max(self) -> Optional[float]:

tests/test_atw_properties.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ async def test_2zone_cancool():
174174
assert device.tank_temperature is None
175175
assert device.status is STATUS_UNKNOWN
176176
assert device.target_tank_temperature is None
177-
assert device.target_tank_temperature_min == 42
177+
assert device.target_tank_temperature_min == 40
178178
assert device.target_tank_temperature_max == 60
179179
assert device.holiday_mode is None
180180

0 commit comments

Comments
 (0)