Skip to content

Commit 0935a12

Browse files
committed
Add walrus as suggested
1 parent c4f0e12 commit 0935a12

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugwise/legacy/helper.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ def _all_locations(self) -> None:
127127
"""Collect all locations."""
128128
loc = Munch()
129129

130-
locations = self._locations.findall("./location")
131130
# Legacy Anna without outdoor_temp and Stretches have no locations, create fake location-data
132-
if not locations:
131+
if not (locations := self._locations.findall("./location")):
133132
self._home_location = FAKE_LOC
134133
self._loc_data[FAKE_LOC] = {"name": "Home"}
135134
return

0 commit comments

Comments
 (0)