Remove access to DeviceRegistry.deleted_devices from rfxtrx (#179719)

This commit is contained in:
Erik Montnemery
2026-08-21 14:07:35 +02:00
committed by GitHub
parent 76c8ed4fb3
commit e6e87db5cd
+3 -3
View File
@@ -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)