Skip to content

Commit f929b89

Browse files
committed
Use find not findall
1 parent b74e505 commit f929b89

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
@@ -221,8 +221,7 @@ async def set_schedule_state(
221221
new_state = "true"
222222

223223
locator = f'.//*[@id="{schedule_rule_id}"]/template'
224-
for rule in self._domain_objects.findall(locator):
225-
template_id = rule.attrib["id"]
224+
template_id = self._domain_objects.find(locator).attrib["id"]
226225

227226
data = f'''
228227
<rules>

0 commit comments

Comments
 (0)