Skip to content

Commit a020c41

Browse files
committed
More fixing after rebase
1 parent f2ea99e commit a020c41

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

plugwise/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _get_groups(self) -> None:
215215
and self.gw_entities[group_id]["name"] == group_name
216216
):
217217
continue
218-
218+
219219
group_type = group.find("type").text
220220
group_appliances = group.findall("appliances/appliance")
221221
for item in group_appliances:

plugwise/helper.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,14 @@ def _get_locations(self) -> None:
243243
loc.loc_id = location.get("id")
244244
loc.name = location.find("name").text
245245
loc._type = location.find("type").text
246+
# Home location is of type building
247+
if loc._type == "building":
248+
counter += 1
249+
self._home_loc_id = loc.loc_id
250+
self._home_location = self._domain_objects.find(
251+
f"./location[@id='{loc.loc_id}']"
252+
)
253+
246254
self._new_locations.append(loc.loc_id)
247255
if (
248256
loc.loc_id in self._existing_locations
@@ -256,13 +264,6 @@ def _get_locations(self) -> None:
256264
"primary_prio": 0,
257265
"secondary": [],
258266
}
259-
# Home location is of type building
260-
if loc._type == "building":
261-
counter += 1
262-
self._home_loc_id = loc.loc_id
263-
self._home_location = self._domain_objects.find(
264-
f"./location[@id='{loc.loc_id}']"
265-
)
266267

267268
removed = list(set(self._existing_locations) - set(self._new_locations))
268269
if self._existing_locations and removed:

plugwise/legacy/helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def _get_appliances(self) -> None:
108108
appl.mac = None
109109
appl.model = appl.pwclass.replace("_", " ").title()
110110
appl.model_id = None
111+
appl.module_id = None
111112
appl.name = appliance.find("name").text
112113
appl.vendor_name = None
113114
appl.zigbee_mac = None

0 commit comments

Comments
 (0)