Skip to content

Commit 3306774

Browse files
author
autoruff
committed
fixup: redo-xml Python code fixed using ruff
1 parent e68ae96 commit 3306774

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

plugwise/legacy/smile.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,7 @@ async def set_preset(self, _: str, preset: str) -> None:
173173
locator = f'rule/directives/when/then[@icon="{preset}"].../.../...'
174174
rule = self._domain_objects.find(locator)
175175
data = (
176-
"<rules>"
177-
"<rule id='{rule.attrib['id']}'>"
178-
"<active>true</active>"
179-
"</rule>"
180-
"</rules>"
176+
"<rules><rule id='{rule.attrib['id']}'><active>true</active></rule></rules>"
181177
)
182178
await self.call_request(RULES, method="put", data=data)
183179

plugwise/smile.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,7 @@ async def set_offset(self, dev_id: str, offset: float) -> None:
190190
)
191191

192192
value = str(offset)
193-
data = (
194-
"<offset_functionality>"
195-
f"<offset>{value}</offset>"
196-
"</offset_functionality>"
197-
)
193+
data = f"<offset_functionality><offset>{value}</offset></offset_functionality>"
198194
uri = f"{APPLIANCES};id={dev_id}/offset;type=temperature_offset"
199195
await self.call_request(uri, method="put", data=data)
200196

0 commit comments

Comments
 (0)