Skip to content

Commit d4588c4

Browse files
committed
Clean up _presets(), remove support for older non-legacy firmware
1 parent 0dd22e9 commit d4588c4

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

plugwise/helper.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -751,21 +751,10 @@ def _presets(self, loc_id: str) -> dict[str, list[float]]:
751751
)
752752
for directive in directives:
753753
preset = directive.find("then").attrib
754-
if "setpoint" in preset:
755-
presets[directive.attrib["preset"]] = [ # pragma: no cover
756-
DEFAULT_PW_MIN,
757-
float(preset["setpoint"]),
758-
]
759-
if not self._cooling_present or not self._cooling_enabled:
760-
presets[directive.attrib["preset"]] = [
761-
float(preset["setpoint"]),
762-
DEFAULT_PW_MAX,
763-
]
764-
else:
765-
presets[directive.attrib["preset"]] = [
766-
float(preset["heating_setpoint"]),
767-
float(preset["cooling_setpoint"]),
768-
]
754+
presets[directive.attrib["preset"]] = [
755+
float(preset["heating_setpoint"]),
756+
float(preset["cooling_setpoint"]),
757+
]
769758

770759
return presets
771760

0 commit comments

Comments
 (0)