mirror of
https://github.com/home-assistant/core.git
synced 2026-05-03 19:41:15 +02:00
Remove tedee device safely from registry (#107529)
remove device safely from registry
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user