Fix deconz tests that have uncaught exceptions (#33462)
This commit is contained in:
parent
977f1a6916
commit
f2f03cf552
3 changed files with 7 additions and 9 deletions
|
@ -86,9 +86,10 @@ class DeconzDevice(DeconzBase, Entity):
|
|||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Disconnect device object when removed."""
|
||||
self._device.remove_callback(self.async_update_callback)
|
||||
del self.gateway.deconz_ids[self.entity_id]
|
||||
for unsub_dispatcher in self.listeners:
|
||||
unsub_dispatcher()
|
||||
if self.entity_id in self.gateway.deconz_ids:
|
||||
del self.gateway.deconz_ids[self.entity_id]
|
||||
for unsub_dispatcher in self.listeners:
|
||||
unsub_dispatcher()
|
||||
|
||||
async def async_remove_self(self, deconz_ids: list) -> None:
|
||||
"""Schedule removal of this entity.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue