Skip to content

Commit 424073d

Browse files
committed
Improve, change to _anna_cooling_derived
Better indication of the function of the var
1 parent 9f96f3c commit 424073d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

plugwise/helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ def __init__(self) -> None:
290290
self._appliances: etree
291291
self._allowed_modes: list[str] = []
292292
self._adam_cooling_enabled = False
293+
self._anna_cooling_derived = False
293294
self._anna_cooling_present = False
294-
self._cooling_enabled = False
295295
self._cooling_activation_outdoor_temp: float
296296
self._cooling_deactivation_threshold: float
297297
self._cooling_present = False
@@ -853,7 +853,7 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
853853
if "temperature" in data:
854854
data.pop("heating_state", None)
855855

856-
# Use cooling_enabled to set self.anna_no_cooling_enabled to False, then remove
856+
# Use cooling_enabled point-log to set self.anna_cool_ena_indication to True, then remove
857857
if self._anna_cooling_present:
858858
self.anna_cool_ena_indication = False
859859
if "cooling_enabled" in data:

plugwise/smile.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ def get_all_devices(self) -> None:
113113
# Actual ongoing heating/cooling is shown via heating_state/cooling_state
114114
if self._anna_cooling_present and not self.anna_cool_ena_indication:
115115
if (
116-
not self._cooling_enabled
116+
not self._anna_cooling_derived
117117
and self._outdoor_temp > self._cooling_activation_outdoor_temp
118118
):
119-
self._cooling_enabled = True
119+
self._anna_cooling_derived = True
120120
if (
121-
self._cooling_enabled
121+
self._anna_cooling_derived
122122
and self._outdoor_temp < self._cooling_deactivation_threshold
123123
):
124-
self._cooling_enabled = False
124+
self._anna_cooling_derived = False
125125

126126
# Don't show cooling_state when no cooling present
127127
for _, device in self.gw_devices.items():
@@ -194,7 +194,7 @@ def _device_data_climate(
194194
if sched_setpoints is None:
195195
device_data["setpoint_low"] = device_data["setpoint"]
196196
device_data["setpoint_high"] = float(40)
197-
if self._cooling_enabled or self.anna_cool_ena_indication:
197+
if self._anna_cooling_derived or self.anna_cooling_enabled:
198198
device_data["setpoint_low"] = float(0)
199199
device_data["setpoint_high"] = device_data["setpoint"]
200200
else:

0 commit comments

Comments
 (0)