Skip to content

Commit 90ddc28

Browse files
committed
Clean up
1 parent e2fbd13 commit 90ddc28

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

plugwise/legacy/smile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ async def set_switch_state(
280280
data = f"<{switch.func_type}><state>{state}</state></{switch.func_type}>"
281281
if members is not None:
282282
return await self._set_groupswitch_member_state(
283-
appl_id, data, members, state, switch
283+
data, members, state, switch
284284
)
285285

286286
# Handle individual relay switches
@@ -293,14 +293,13 @@ async def set_switch_state(
293293
return requested_state
294294

295295
async def _set_groupswitch_member_state(
296-
self, appl_id: str, data: str, members: list[str], state: str, switch: Munch
296+
self, data: str, members: list[str], state: str, switch: Munch
297297
) -> bool:
298298
"""Helper-function for set_switch_state().
299299
300300
Set the requested state of the relevant switch within a group of switches.
301301
Return the current group-state when none of the switches has changed its state, the requested state otherwise.
302302
"""
303-
current_state = self.gw_entities[appl_id]["switches"]["relay"]
304303
end_states: list[bool] = []
305304
requested_state = state == STATE_ON
306305
for member in members:

plugwise/smile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ async def set_switch_state(
418418

419419
if members is not None:
420420
return await self._set_groupswitch_member_state(
421-
appl_id, data, members, state, switch
421+
data, members, state, switch
422422
)
423423

424424
locator = f'appliance[@id="{appl_id}"]/{switch.actuator}/{switch.func_type}'
@@ -444,14 +444,13 @@ async def set_switch_state(
444444
return requested_state
445445

446446
async def _set_groupswitch_member_state(
447-
self, appl_id: str, data: str, members: list[str], state: str, switch: Munch
447+
self, data: str, members: list[str], state: str, switch: Munch
448448
) -> bool:
449449
"""Helper-function for set_switch_state().
450450
451451
Set the requested state of the relevant switch within a group of switches.
452452
Return the current group-state when none of the switches has changed its state, the requested state otherwise.
453453
"""
454-
current_state = self.gw_entities[appl_id]["switches"]["relay"]
455454
end_states: list[bool] = []
456455
requested_state = state == STATE_ON
457456
for member in members:

0 commit comments

Comments
 (0)