Skip to content

Commit 665285b

Browse files
committed
Force str(control_state)
1 parent 25fd8cb commit 665285b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugwise/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _get_location_data(self, loc_id: str) -> GwEntityData:
170170
"heating",
171171
"preheating",
172172
):
173-
data["control_state"] = ctrl_state
173+
data["control_state"] = str(ctrl_state)
174174

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

plugwise/helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,9 @@ def _get_actuator_functionalities(
521521
act_key = cast(ActuatorDataType, key)
522522
self._count += 1
523523
try:
524-
temp_dict[act_key] = format_measure(pw_function.text, TEMP_CELSIUS)
524+
temp_dict[act_key] = format_measure(
525+
pw_function.text, TEMP_CELSIUS
526+
)
525527
except ValueError:
526528
temp_dict[act_key] = str(pw_function.text)
527529

0 commit comments

Comments
 (0)