Skip to content

Commit 9246b5d

Browse files
committed
Improve group-switch logic for Adam
1 parent 2b0bf39 commit 9246b5d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugwise/smile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ async def _set_groupswitch_member_state(
458458
locator = f'appliance[@id="{member}"]/{switch.actuator}/{switch.func_type}'
459459
switch_id = self._domain_objects.find(locator).attrib["id"]
460460
uri = f"{APPLIANCES};id={member}/{switch.device};id={switch_id}"
461-
if not self.gw_entities[member]["switches"].get("lock"):
461+
lock_blocked = self.gw_entities[member]["switches"].get("lock")
462+
# Assume Plugs under Plugwise control are not part of a group
463+
if lock_blocked is not None and not lock_blocked:
462464
await self.call_request(uri, method="put", data=data)
463465
switched += 1
464466

0 commit comments

Comments
 (0)