Skip to content

Commit 1409d3c

Browse files
committed
Try
1 parent 6ac5bbd commit 1409d3c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugwise/helper.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,18 @@ def _get_appliances(self) -> bool:
157157

158158
extend_plug_device_class(appl, appliance)
159159

160-
# Collect appliance info, skip orphaned/removed devices
161-
if not (appl := self._appliance_info_finder(appl, appliance)):
162-
continue
163-
164160
self._new_appliances.append(appl.entity_id)
165161
if (
166162
appl.entity_id in self._existing_appliances
167163
and self.gw_entities[appl.entity_id]["name"] == appl.name
168164
):
169165
continue
170166

167+
# Collect appliance info, skip orphaned/removed devices
168+
if not (appl := self._appliance_info_finder(appl, appliance)):
169+
self._new_appliances.pop()
170+
continue
171+
171172
self._create_gw_entities(appl)
172173

173174
# A smartmeter is not present as an appliance, add it specifically

0 commit comments

Comments
 (0)