Skip to content

Commit 1cfd793

Browse files
committed
Improve
1 parent 957c9f2 commit 1cfd793

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugwise/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,22 +176,22 @@ def _reorder_devices(self) -> None:
176176
def _get_groups(self) -> dict[str, GwEntityData]:
177177
"""Helper-function for smile.py: get_all_gateway_entities().
178178
179-
Collect pumping-groups info.
179+
Collect info for pumping-group(s).
180180
"""
181181
groups: dict[str, GwEntityData] = {}
182182
# P1 and Anna don't have groups
183183
if self.smile.type == "power" or self.check_name(ANNA):
184184
return groups
185185

186186
for group in self._domain_objects.findall("./group"):
187-
members: list[str] = []
188-
group_id = group.attrib["id"]
189-
group_name = group.find("name").text
190187
group_type = group.find("type").text
191188
if group_type != "pumping":
192189
continue
193190

194191
group_appliances = group.findall("appliances/appliance")
192+
group_id = group.attrib["id"]
193+
group_name = group.find("name").text
194+
members: list[str] = []
195195
for item in group_appliances:
196196
# Check if members are not orphaned - stretch
197197
if item.attrib["id"] in self.gw_entities:

0 commit comments

Comments
 (0)