Skip to content

Commit ecb96d2

Browse files
committed
Clean up
1 parent 12b7bfe commit ecb96d2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugwise/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ def _get_location_data(self, loc_id: str) -> GwEntityData:
157157
data = self._get_zone_data(loc_id)
158158
data["control_state"] = "idle"
159159
self._count += 1
160-
if (ctrl_state := self._control_state(data, loc_id)) and str(ctrl_state) in (
160+
if (ctrl_state := self._control_state(data)) and ctrl_state in (
161161
"cooling",
162162
"heating",
163163
"preheating",
164164
):
165-
data["control_state"] = str(ctrl_state)
165+
data["control_state"] = ctrl_state
166166

167167
data["sensors"].pop("setpoint") # remove, only used in _control_state()
168168
self._count -= 1

plugwise/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ def _rank_thermostat(
790790
else:
791791
thermo_loc["secondary"].append(appliance_id)
792792

793-
def _control_state(self, data: GwEntityData, loc_id: str) -> str | bool:
793+
def _control_state(self, data: GwEntityData) -> str | bool:
794794
"""Helper-function for _get_adam_data().
795795
796796
Adam: find the thermostat control_state of a location, from DOMAIN_OBJECTS.

0 commit comments

Comments
 (0)