Skip to content

Commit 3de0348

Browse files
committed
Add missing .strip()
1 parent 5e5e9e3 commit 3de0348

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugwise/smile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ async def set_preset(self, loc_id: str, preset: str) -> None:
218218
</locations>
219219
'''
220220
uri = f"{LOCATIONS};id={loc_id}"
221-
await self.call_request(uri, method="put", data=data)
221+
await self.call_request(uri, method="put", data=data.strip())
222222

223223
async def set_select(
224224
self, key: str, loc_id: str, option: str, state: str | None
@@ -426,7 +426,7 @@ async def set_switch_state(
426426
if self._domain_objects.find(locator).text == "true":
427427
raise PlugwiseError("Plugwise: the locked Relay was not switched.")
428428

429-
await self.call_request(uri, method="put", data=data)
429+
await self.call_request(uri, method="put", data=data.strip())
430430

431431
async def _set_groupswitch_member_state(
432432
self, members: list[str], state: str, switch: Munch

0 commit comments

Comments
 (0)