Skip to content

Commit b275c4f

Browse files
committed
Reduce complexity 3
1 parent c3a35d8 commit b275c4f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugwise/helper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,8 @@ def _get_measurement_data(self, dev_id: str) -> DeviceZoneData:
546546
data.pop("c_heating_state")
547547
self._count -= 1
548548

549-
self._update_anna_cooling(dev_id, data)
549+
if self._is_thermostat and self.smile(ANNA):
550+
self._update_anna_cooling(dev_id, data)
550551

551552
def _power_data_from_location(self, loc_id: str) -> DeviceZoneData:
552553
"""Helper-function for smile.py: _get_device_zone_data().
@@ -746,7 +747,7 @@ def _process_c_heating_state(self, data: DeviceZoneData) -> None:
746747
"""
747748
# Adam or Anna + OnOff device
748749
if self._on_off_device:
749-
self._process_on_off_device_c_heating_state(self, data)
750+
self._process_on_off_device_c_heating_state(data)
750751

751752
# Anna + Elga: use central_heating_state to show heating_state
752753
if self._elga:
@@ -777,7 +778,7 @@ def _update_anna_cooling(self, dev_id: str, data: DeviceZoneData) -> None:
777778
778779
Support added for Techneco Elga and Thercon Loria/Thermastage.
779780
"""
780-
if self._is_thermostat and self.smile(ANNA) and dev_id == self._heater_id:
781+
if dev_id == self._heater_id:
781782
# Anna+Elga: base cooling_state on the elga-status-code
782783
if "elga_status_code" in data:
783784
if data["thermostat_supports_cooling"]:

0 commit comments

Comments
 (0)