mirror of
https://github.com/home-assistant/core.git
synced 2026-08-27 00:23:40 +01:00
Remove access to DeviceRegistry.deleted_devices from rfxtrx (#179719)
This commit is contained in:
@@ -252,10 +252,10 @@ async def async_setup_internal(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
||||
def _updated_device(event: Event[EventDeviceRegistryUpdatedData]) -> None:
|
||||
if event.data["action"] != "remove":
|
||||
return
|
||||
device_entry = device_registry.deleted_devices[event.data["device_id"]]
|
||||
if entry.entry_id not in device_entry.config_entries:
|
||||
device = event.data["device"]
|
||||
if device["config_entry_id"] != entry.entry_id:
|
||||
return
|
||||
device_id = get_device_tuple_from_identifiers(device_entry.identifiers)
|
||||
device_id = get_device_tuple_from_identifiers(device["identifiers"])
|
||||
if device_id:
|
||||
_remove_device(device_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user