Skip to content

Commit b09eea4

Browse files
committed
Make sure to detect location-name change
1 parent 72fac4b commit b09eea4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugwise/helper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,14 @@ def _get_locations(self) -> None:
225225
locations = self._domain_objects.findall("./location")
226226
for location in locations:
227227
loc.loc_id = location.attrib["id"]
228+
loc.name = location.find("name").text
228229
self._new_locations.append(loc.loc_id)
229-
if loc.loc_id in self._existing_locations:
230+
if (
231+
loc.loc_id in self._existing_locations
232+
and self._loc_data[loc.loc_id]["name"] == loc.name
233+
):
230234
continue
231235

232-
loc.name = location.find("name").text
233236
self._loc_data[loc.loc_id] = {
234237
"name": loc.name,
235238
"primary": [],

0 commit comments

Comments
 (0)