Skip to content

Commit 9d6962a

Browse files
committed
Raise when a relay cannot be switched
1 parent d79cae3 commit 9d6962a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugwise/smile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ async def set_switch_state(
637637
lock_state: str = self._appliances.find(locator).text
638638
# Don't bother switching a relay when the corresponding lock-state is true
639639
if lock_state == "true":
640-
return
640+
raise PlugwiseException("Cannot switch a locked Relay.")
641641

642642
await self._request(uri, method="put", data=data)
643643

0 commit comments

Comments
 (0)