Skip to content

Commit d79572f

Browse files
committed
Change logic as suggested
1 parent 1ac65b0 commit d79572f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugwise/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,14 +682,14 @@ async def set_temperature(self, loc_id: str, items: dict[str, float]) -> None:
682682
setpoint = items["setpoint"]
683683

684684
if self._cooling_present:
685-
if "setpoint_high" in items:
686-
tmp_setpoint_high = items["setpoint_high"]
687-
tmp_setpoint_low = items["setpoint_low"]
688-
else:
685+
if "setpoint_high" not in items:
689686
raise PlugwiseError(
690687
"Plugwise: wrong target-temperature provided, provide values for"
691688
" both target-temperature-low and target-temperature-high."
692689
)
690+
691+
tmp_setpoint_high = items["setpoint_high"]
692+
tmp_setpoint_low = items["setpoint_low"]
693693
if self._cooling_enabled: # in cooling mode
694694
setpoint = tmp_setpoint_high
695695
if tmp_setpoint_low != MIN_SETPOINT:

0 commit comments

Comments
 (0)