Skip to content

Commit 50a4b52

Browse files
committed
Clean up
1 parent 8646f68 commit 50a4b52

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
@@ -163,12 +163,12 @@ def _get_location_data(self, loc_id: str) -> GwEntityData:
163163
data = self._get_zone_data(loc_id)
164164
data["control_state"] = "idle"
165165
self._count += 1
166-
if (ctrl_state := self._control_state(data, loc_id)) and str(ctrl_state) in (
166+
if (ctrl_state := self._control_state(data)) and ctrl_state in (
167167
"cooling",
168168
"heating",
169169
"preheating",
170170
):
171-
data["control_state"] = str(ctrl_state)
171+
data["control_state"] = ctrl_state
172172

173173
if "setpoint" in data["sensors"]:
174174
data["sensors"].pop("setpoint") # remove, only used in _control_state()

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)