Skip to content

Commit 31a7bbd

Browse files
committed
Simplify
1 parent 0fabd75 commit 31a7bbd

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

plugwise/helper.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -856,17 +856,13 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
856856

857857
# Remove c_heating_state from the output
858858
if "c_heating_state" in data:
859-
# Anna + Elga doesn't use intended_cental_heating_state to show the generic heating state
860-
if self._anna_cooling_present and "heating_state" in data:
861-
if data.get("c_heating_state") and not data.get("heating_state"):
862-
data["heating_state"] = True
863-
# Adam + OnOff heater/cooler doesn't use intended_cental_heating_state to show the generic
864-
# heating or cooling state
865-
if self.smile_name == "Adam" and self._on_off_device:
859+
# Anna + Elga and Adam + OnOff heater/cooler don't use intended_cental_heating_state
860+
# to show the generic heating state
861+
if (self._anna_cooling_present and "heating_state" in data) or (
862+
self.smile_name == "Adam" and self._on_off_device
863+
):
866864
if data.get("c_heating_state") and not data.get("heating_state"):
867865
data["heating_state"] = True
868-
if self._cooling_present:
869-
data["cooling_state"] = False
870866

871867
data.pop("c_heating_state")
872868

0 commit comments

Comments
 (0)