Skip to content

Commit 2af0d29

Browse files
committed
Correct comment, merge if-lines
1 parent 57b106a commit 2af0d29

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

plugwise/smile.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def get_all_devices(self) -> None:
146146
self._cooling_present = False
147147
if search.find(locator_1) is not None:
148148
self._cooling_present = True
149-
# Alternative method for the Anna with Elga, or alternative method for the Anna with Loria/Thermastage
149+
# Alternative method for the Anna with Elga
150150
elif search.find(locator_2) is not None:
151151
self._cooling_present = True
152152

@@ -182,11 +182,10 @@ def _device_data_adam(
182182
"""Helper-function for _get_device_data().
183183
Determine Adam device data.
184184
"""
185-
if self.smile_name == "Adam":
186-
# Indicate heating_state based on valves being open in case of city-provided heating
187-
if details.get("dev_class") == "heater_central":
188-
if self._on_off_device and self._heating_valves() is not None:
189-
device_data["heating_state"] = self._heating_valves() != 0
185+
# Indicate heating_state based on valves being open in case of city-provided heating
186+
if self.smile_name == "Adam" and details.get("dev_class") == "heater_central":
187+
if self._on_off_device and self._heating_valves() is not None:
188+
device_data["heating_state"] = self._heating_valves() != 0
190189

191190
return device_data
192191

0 commit comments

Comments
 (0)