Skip to content

Commit 9208cf7

Browse files
committed
Correct wrong updates
1 parent ca23933 commit 9208cf7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

plugwise/helper.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -797,15 +797,15 @@ def _presets(self, loc_id: str) -> dict[str, list[float]]:
797797
for directive in directives:
798798
preset = directive.find("then").attrib
799799
if "setpoint" in preset:
800-
if not self._cooling_present or self._cooling_enabled:
800+
if not self._cooling_present or not self._cooling_enabled:
801801
presets[directive.attrib["preset"]] = [
802802
float(preset["setpoint"]),
803-
DEFAULT_PW_MIN,
803+
DEFAULT_PW_MAX,
804804
]
805805
else:
806806
presets[directive.attrib["preset"]] = [ # pragma: no cover
807+
DEFAULT_PW_MIN,
807808
float(preset["setpoint"]),
808-
DEFAULT_PW_MAX,
809809
]
810810
else:
811811
presets[directive.attrib["preset"]] = [
@@ -1255,15 +1255,15 @@ def _schedules(
12551255
for directive in directives:
12561256
entry = directive.find("then").attrib
12571257
if "setpoint" in entry:
1258-
if not self._cooling_present or self._cooling_enabled:
1258+
if not self._cooling_present or not self._cooling_enabled:
12591259
schedule[directive.attrib["time"]] = [
12601260
float(entry["setpoint"]),
1261-
DEFAULT_PW_MIN,
1261+
DEFAULT_PW_MAX,
12621262
]
12631263
else:
12641264
schedule[directive.attrib["time"]] = [
1265+
DEFAULT_PW_MIN,
12651266
float(entry["setpoint"]),
1266-
DEFAULT_PW_MAX,
12671267
]
12681268
elif "preset" in entry:
12691269
schedule[directive.attrib["time"]] = [

0 commit comments

Comments
 (0)