Skip to content

Commit 3a7fa14

Browse files
committed
Make sure to detect location-name change
1 parent a0fdefa commit 3a7fa14

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugwise/helper.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ def _get_locations(self) -> None:
245245
loc.loc_id = location.get("id")
246246
loc.name = location.find("name").text
247247
loc._type = location.find("type").text
248+
self._new_locations.append(loc.loc_id)
249+
if (
250+
loc.loc_id in self._existing_locations
251+
and self._loc_data[loc.loc_id]["name"] == loc.name
252+
):
253+
continue
254+
248255
self._loc_data[loc.loc_id] = {
249256
"name": loc.name,
250257
"primary": [],

0 commit comments

Comments
 (0)