Skip to content

Commit fa7fa54

Browse files
committed
Add handling of Adam + onoff_device heating and cooling states
1 parent 3d16dff commit fa7fa54

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

plugwise/helper.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,11 +858,22 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
858858
data.update(self._get_lock_state(appliance))
859859

860860
# Remove c_heating_state from the output
861-
# Also, Elga doesn't use intended_cental_heating_state to show the generic heating state
862861
if "c_heating_state" in data:
862+
# Anna + Elga doesn't use intended_cental_heating_state to show the generic heating state
863863
if self._anna_cooling_present and "heating_state" in data:
864864
if data.get("c_heating_state") and not data.get("heating_state"):
865865
data["heating_state"] = True
866+
# Adam + OnOff heater/cooler doesn't use intended_cental_heating_state to show the generic
867+
# heating or cooling state
868+
if self.smile_name == "Adam" and self._on_off_device:
869+
if data.get("c_heating_state") and not data.get("heating_state"):
870+
data["heating_state"] = True
871+
if self._cooling_present:
872+
data["cooling_state"] = False
873+
if self._adam_cooling_enabled:
874+
data["cooling_state"] = True
875+
data["heating_state"] = False
876+
866877
data.pop("c_heating_state")
867878

868879
# Fix for Adam + Anna: heating_state also present under Anna, remove

0 commit comments

Comments
 (0)