Skip to content

Commit c7e3b8f

Browse files
committed
Define defaults and implement
1 parent 668a026 commit c7e3b8f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

plugwise/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@
388388
DEFAULT_TIMEOUT: Final = 30
389389
DEFAULT_USERNAME: Final = "smile"
390390
DEFAULT_PORT: Final = 80
391+
DEFAULT_PW_MAX: Final = 30.0
392+
DEFAULT_PW_MIN: Final = 4.0
391393
NONE: Final = "None"
392394
FAKE_APPL: Final = "aaaa0000aaaa0000aaaa0000aaaa00aa"
393395
FAKE_LOC: Final = "0000aaaa0000aaaa0000aaaa0000aa00"

plugwise/helper.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
BINARY_SENSORS,
2626
DATA,
2727
DAYS,
28+
DEFAULT_PW_MAX,
29+
DEFAULT_PW_MIN,
2830
DEVICE_MEASUREMENTS,
2931
ENERGY_KILO_WATT_HOUR,
3032
ENERGY_WATT_HOUR,
@@ -798,12 +800,12 @@ def _presets(self, loc_id: str) -> dict[str, list[float]]:
798800
if not self._cooling_present or self._cooling_enabled:
799801
presets[directive.attrib["preset"]] = [
800802
float(preset["setpoint"]),
801-
30,
803+
DEFAULT_PW_MAX,
802804
]
803805
else:
804806
presets[directive.attrib["preset"]] = [
805807
float(preset["setpoint"]),
806-
7,
808+
DEFAULT_PW_MIN,
807809
]
808810
else:
809811
presets[directive.attrib["preset"]] = [

0 commit comments

Comments
 (0)