We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3af64a5 commit 0a7c5a2Copy full SHA for 0a7c5a2
plugwise/smile.py
@@ -405,12 +405,13 @@ async def set_switch_state(
405
locator = f'appliance[@id="{appl_id}"]/{switch.actuator}/{switch.func_type}'
406
found: list[etree] = self._domain_objects.findall(locator)
407
for item in found:
408
+ # multiple types of e.g. toggle_functionality present
409
if (sw_type := item.find("type")) is not None:
410
if sw_type.text == switch.act_type:
411
switch_id = item.attrib["id"]
- else:
412
+ break
413
+ else: # actuators with a single item like relay_functionality
414
- break
415
416
data = f"""
417
<{switch.func_type}>
0 commit comments