Skip to content

Commit 81b7bf5

Browse files
committed
Force str(control_state)
1 parent e3da1db commit 81b7bf5

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
@@ -164,7 +164,7 @@ def _get_location_data(self, loc_id: str) -> GwEntityData:
164164
"heating",
165165
"preheating",
166166
):
167-
data["control_state"] = ctrl_state
167+
data["control_state"] = str(ctrl_state)
168168

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

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)