Skip to content

Commit 1687794

Browse files
committed
Make added error-message more generic
1 parent b50bb62 commit 1687794

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plugwise/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -684,23 +684,21 @@ async def set_temperature(self, loc_id: str, items: dict[str, float]) -> None:
684684
if self._cooling_present:
685685
if "setpoint_high" not in items:
686686
raise PlugwiseError(
687-
"Plugwise: wrong target-temperature provided, provide values for"
688-
" both target-temperature-low and target-temperature-high."
687+
"Plugwise: failed setting temperature: no valid input provided"
689688
)
690-
691689
tmp_setpoint_high = items["setpoint_high"]
692690
tmp_setpoint_low = items["setpoint_low"]
693691
if self._cooling_enabled: # in cooling mode
694692
setpoint = tmp_setpoint_high
695693
if tmp_setpoint_low != MIN_SETPOINT:
696694
raise PlugwiseError(
697-
"Plugwise: heating setpoint cannot be changed when in cooling mode!"
695+
"Plugwise: heating setpoint cannot be changed when in cooling mode"
698696
)
699697
else: # in heating mode
700698
setpoint = tmp_setpoint_low
701699
if tmp_setpoint_high != MAX_SETPOINT:
702700
raise PlugwiseError(
703-
"Plugwise: cooling setpoint cannot be changed when in heating mode!"
701+
"Plugwise: cooling setpoint cannot be changed when in heating mode"
704702
)
705703

706704
if setpoint is None:

0 commit comments

Comments
 (0)