Skip to content

Commit af9e3fa

Browse files
committed
Add/update missing property, update set_relay_lock typing
1 parent 2e0e24f commit af9e3fa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

plugwise_usb/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,13 @@ def relay(self) -> bool:
377377
Raises NodeError when relay feature is not present at device.
378378
"""
379379

380+
@property
381+
def relay_lock(self) -> RelayLock:
382+
"""Last known relay lock state information.
383+
384+
Raises NodeError when relay lock feature is not present at device.
385+
"""
386+
380387
@property
381388
def relay_state(self) -> RelayState:
382389
"""Last known relay state information.

plugwise_usb/nodes/circle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,13 @@ def relay_lock(self) -> RelayLock:
183183
"""State of the relay lock."""
184184
return self._relay_lock
185185

186-
async def set_relay_lock(self, state: bool) -> RelayLock:
186+
async def set_relay_lock(self, state: bool) -> bool:
187187
"""Set the state of the relay-lock."""
188188
await self._relay_update_lock(state)
189189
await self.publish_feature_update_to_subscribers(
190190
NodeFeature.RELAY_LOCK, state
191191
)
192+
return state
192193

193194
# endregion
194195

0 commit comments

Comments
 (0)