mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix deCONZ change entity_id bug (#22974)
Fix deCONZ change entity_id bug
This commit is contained in:
parent
72af4276b9
commit
6463b8165f
@ -26,10 +26,9 @@ class DeconzDevice(Entity):
|
||||
|
||||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Disconnect device object when removed."""
|
||||
if self.unsub_dispatcher is not None:
|
||||
self.unsub_dispatcher()
|
||||
self._device.remove_callback(self.async_update_callback)
|
||||
self._device = None
|
||||
del self.gateway.deconz_ids[self.entity_id]
|
||||
self.unsub_dispatcher()
|
||||
|
||||
@callback
|
||||
def async_update_callback(self, reason):
|
||||
|
Loading…
x
Reference in New Issue
Block a user