Skip to content

Commit 6a4d25a

Browse files
committed
_get_appliances(): return also True for removed appliances
1 parent a224806 commit 6a4d25a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugwise/helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,16 @@ def _get_appliances(self) -> bool:
178178
# Sort the gw_entities
179179
self._reorder_devices()
180180

181-
removed = list(set(self._existing_appliances) - set(self._new_appliances))
182181
new = list(set(self._new_appliances) - set(self._existing_appliances))
182+
removed = list(set(self._existing_appliances) - set(self._new_appliances))
183183
if self._existing_appliances:
184184
for appliance in removed:
185185
self.gw_entities.pop(appliance)
186186

187187
self._existing_appliances = self._new_appliances
188188
self._new_appliances = []
189189

190-
if new:
190+
if new or removed:
191191
return True
192192

193193
return False

0 commit comments

Comments
 (0)