Skip to content

Commit a96a7a2

Browse files
committed
Doc-string updates
1 parent 5785ebe commit a96a7a2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

plugwise/legacy/smile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ async def set_switch_state(
241241
For individual switches, sets the state directly.
242242
For group switches, sets the state for each member in the group separately.
243243
For switch-locks, sets the lock state using a different data format.
244+
Return the requested state when succesful, the current state otherwise.
244245
"""
245246
current_state = self.gw_entities[appl_id]["switches"]["relay"]
246247
requested_state = state == STATE_ON
@@ -296,6 +297,7 @@ async def _set_groupswitch_member_state(
296297
"""Helper-function for set_switch_state().
297298
298299
Set the given State of the relevant Switch (relay) within a group of members.
300+
Return the requested state when at least one requested change was succesful, the current state otherwise.
299301
"""
300302
current_state = self.gw_entities[appl_id]["switches"]["relay"]
301303
requested_state = state == STATE_ON

plugwise/smile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,10 @@ def determine_contexts(
380380
async def set_switch_state(
381381
self, appl_id: str, members: list[str] | None, model: str, state: str
382382
) -> bool:
383-
"""Set the given State of the relevant Switch."""
383+
"""Set the given State of the relevant Switch.
384+
385+
Return the requested state when succesful, the current state otherwise.
386+
"""
384387
model_type = cast(SwitchType, model)
385388
current_state = self.gw_entities[appl_id]["switches"][model_type]
386389
requested_state = state == STATE_ON
@@ -442,6 +445,7 @@ async def _set_groupswitch_member_state(
442445
"""Helper-function for set_switch_state().
443446
444447
Set the given State of the relevant Switch within a group of members.
448+
Return the requested state when at least one requested change was succesful, the current state otherwise.
445449
"""
446450
current_state = self.gw_entities[appl_id]["switches"]["relay"]
447451
requested_state = state == STATE_ON

0 commit comments

Comments
 (0)