File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -148,18 +148,15 @@ def _all_locations(self) -> None:
148148 return
149149
150150 for location in locations :
151- loc .name = location .find ("name" ).text
152151 loc .loc_id = location .attrib ["id" ]
152+ loc .name = location .find ("name" ).text
153+ loc ._type = location .find ("type" ).text
153154 # Filter the valid single location for P1 legacy: services not empty
154155 locator = "./services"
155156 if self .smile .type == "power" and len (location .find (locator )) == 0 :
156157 continue
157158
158- if loc .name == "Home" :
159- self ._home_loc_id = loc .loc_id
160- # Replace location-name for P1 legacy, can contain privacy-related info
161- if self .smile .type == "power" :
162- loc .name = "Home"
159+ if loc ._type == "building" :
163160 self ._home_loc_id = loc .loc_id
164161
165162 self ._loc_data [loc .loc_id ] = {"name" : loc .name }
You can’t perform that action at this time.
0 commit comments