Skip to content

Commit 3eace20

Browse files
committed
Debug
1 parent 7ca7b03 commit 3eace20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugwise/smile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
DOMAIN_OBJECTS,
1717
GATEWAY_REBOOT,
1818
LOCATIONS,
19+
LOGGER,
1920
MAX_SETPOINT,
2021
MIN_SETPOINT,
2122
NONE,
@@ -424,7 +425,9 @@ async def set_switch_state(
424425
switch_id = item.attrib["id"]
425426

426427
uri = f"{APPLIANCES};id={appl_id}/{switch.device};id={switch_id}"
427-
if model == "relay" and self.gw_entities[appl_id]["switches"].get("lock"):
428+
lock_blocked = self.gw_entities[appl_id]["switches"].get("lock")
429+
LOGGER.debug("HOI lock_blocked=%s", lock_blocked)
430+
if model == "relay" and lock_blocked:
428431
# Don't switch a relay when its corresponding lock-state is true or no
429432
# lock is present. That means the relay can't be controlled by the user.
430433
return current_state

0 commit comments

Comments
 (0)