Skip to content

Commit 9814fe4

Browse files
committed
Use find not findall
1 parent 1a6d924 commit 9814fe4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugwise/legacy/smile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ async def set_schedule_state(
215215
new_state = "true"
216216

217217
locator = f'.//*[@id="{schedule_rule_id}"]/template'
218-
for rule in self._domain_objects.findall(locator):
219-
template_id = rule.attrib["id"]
218+
template_id = self._domain_objects.find(locator).attrib["id"]
220219

221220
data = (
222221
"<rules>"

0 commit comments

Comments
 (0)