@@ -78,13 +78,9 @@ def get_all_gateway_entities(self) -> None:
7878 """Collect the Plugwise gateway entities and their data and states from the received raw XML-data.
7979
8080 First, collect all the connected entities and their initial data.
81- Collect and add switching- and/or pump-group entities.
8281 Finally, collect the data and states for each entity.
8382 """
8483 self ._all_appliances ()
85- if group_data := self ._get_groups ():
86- self .gw_entities .update (group_data )
87-
8884 self ._all_entity_data ()
8985
9086 async def async_update (self ) -> dict [str , GwEntityData ]:
@@ -225,7 +221,6 @@ async def set_switch_state(
225221 """Set the given state of the relevant switch.
226222
227223 For individual switches, sets the state directly.
228- For group switches, sets the state for each member in the group separately.
229224 For switch-locks, sets the lock state using a different data format.
230225 Return the requested state when succesful, the current state otherwise.
231226 """
@@ -261,13 +256,6 @@ async def set_switch_state(
261256 await self .call_request (APPLIANCES , method = "post" , data = data )
262257 return requested_state
263258
264- # Handle group of switches
265- data = f"<{ switch .func_type } ><state>{ state } </state></{ switch .func_type } >"
266- if members is not None :
267- return await self ._set_groupswitch_member_state (
268- appl_id , data , members , state , switch
269- )
270-
271259 # Handle individual relay switches
272260 uri = f"{ APPLIANCES } ;id={ appl_id } /relay"
273261 if model == "relay" and self .gw_entities [appl_id ]["switches" ]["lock" ]:
@@ -277,28 +265,6 @@ async def set_switch_state(
277265 await self .call_request (uri , method = "put" , data = data )
278266 return requested_state
279267
280- async def _set_groupswitch_member_state (
281- self , appl_id : str , data : str , members : list [str ], state : str , switch : Munch
282- ) -> bool :
283- """Helper-function for set_switch_state().
284-
285- Set the requested state of the relevant switch within a group of switches.
286- Return the current group-state when none of the switches has changed its state, the requested state otherwise.
287- """
288- current_state = self .gw_entities [appl_id ]["switches" ]["relay" ]
289- requested_state = state == STATE_ON
290- switched = 0
291- for member in members :
292- if not self .gw_entities [member ]["switches" ]["lock" ]:
293- uri = f"{ APPLIANCES } ;id={ member } /relay"
294- await self .call_request (uri , method = "put" , data = data )
295- switched += 1
296-
297- if switched > 0 :
298- return requested_state
299-
300- return current_state # pragma: no cover
301-
302268 async def set_temperature (self , _ : str , items : dict [str , float ]) -> None :
303269 """Set the given Temperature on the relevant Thermostat."""
304270 setpoint : float | None = None
0 commit comments