Remove tedee device safely from registry (#107529)
remove device safely from registry
This commit is contained in:
parent
cc67fd8a3c
commit
080484f2f6
1 changed files with 4 additions and 1 deletions
|
@ -121,7 +121,10 @@ class TedeeApiCoordinator(DataUpdateCoordinator[dict[int, TedeeLock]]):
|
|||
if device := device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, str(lock_id))}
|
||||
):
|
||||
device_registry.async_remove_device(device.id)
|
||||
device_registry.async_update_device(
|
||||
device_id=device.id,
|
||||
remove_config_entry_id=self.config_entry.entry_id,
|
||||
)
|
||||
|
||||
# add new locks
|
||||
if new_locks := current_locks - self._locks_last_update:
|
||||
|
|
Loading…
Add table
Reference in a new issue