File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -296,14 +296,18 @@ async def _set_groupswitch_member_state(
296296
297297 Set the given State of the relevant Switch (relay) within a group of members.
298298 """
299+ req_state = state == STATE_ON
299300 switched = 0
300301 for member in members :
301302 if not self .gw_entities [member ]["switches" ]["lock" ]:
302303 uri = f"{ APPLIANCES } ;id={ member } /relay"
303304 await self .call_request (uri , method = "put" , data = data )
304305 switched += 1
305306
306- return switched > 0
307+ if switched > 0 :
308+ return req_state
309+ else :
310+ return not req_state
307311
308312 async def set_temperature (self , _ : str , items : dict [str , float ]) -> None :
309313 """Set the given Temperature on the relevant Thermostat."""
Original file line number Diff line number Diff line change @@ -434,6 +434,7 @@ async def _set_groupswitch_member_state(
434434
435435 Set the given State of the relevant Switch within a group of members.
436436 """
437+ req_state = state == STATE_ON
437438 switched = 0
438439 for member in members :
439440 locator = f'appliance[@id="{ member } "]/{ switch .actuator } /{ switch .func_type } '
@@ -448,7 +449,11 @@ async def _set_groupswitch_member_state(
448449 await self .call_request (uri , method = "put" , data = data )
449450 switched += 1
450451
451- return switched > 0
452+ if switched > 0 :
453+ return req_state
454+ else :
455+ return not req_state
456+
452457
453458 async def set_temperature (self , loc_id : str , items : dict [str , float ]) -> None :
454459 """Set the given Temperature on the relevant Thermostat."""
You can’t perform that action at this time.
0 commit comments