Homematic - cannot delete obsolate devices and entities & failure of "delete cache service"

Hi,

I have a problem with the Homematic IP integration and need your help.
During a test phase, I configured two CCU3 hubs with various Homematic devices in Home Assistant.
At some point I deactivated the second CCU3 hub in the Home Assistant integration.
Since the second CCU3 hub no longer exists, I wanted to clean up Home Assistant and delete the devices and entities that were not needed/obsolated (20 devices and 600 entities).
I first encountered the problem that I couldn’t delete some of them, with the message under device info: “The device has been disabled by the Configuration”…
Message similar to this one: (screenshot from another community post)

I then read in a community post that in such a case I have to delete the integration so that I can then delete the devices.
Since I didn’t want to lose the entire configuration of my running CCU3 hub, I didn’t delete the entire integration, but only the instance for the second hub who didn’t exist anymore.
I was then able to delete some entities, but a lot of them still stubbornly remain in Home Assistant and I can’t delete them.
When I try to delete Homematic devices using the service “homematicip_local.delete_device”, I don’t see these devices in the pick list.
I then wanted to start the service to clear the cache “homematicip_local.clear_cache” (without knowing what exactly it does), but unfortunately that didn’t work either.
Then I get the following message:
“Error calling service homematicip_local.clear_cache. Unknown error”

I’ve run out of ideas…
Does anyone know how I could proceed here to cleanly delete the obsolated devices and entities from my system?
What does the clearing cache do and why doesn’t it work?
many thanks

short feedback.
After opening an issue here:

I had no other option than to edit the core.device_registry file in HA and remove the devices there.
My system is now clean again and still alive :slight_smile:
However, I still wonder what caused this behavior.