HA Prune: Clear up old and stale entities

Hello!

The last few days, I wrote some code to address a problem I have with Home Assistant.

Devices can be renamed outside of Home Assistant. When this happens, the integration does not propagate that change to Home Assistant, i.e., the entity_id is not changed. This makes sense to not break automations etc.

On the other hand, that causes names outside and inside of Home Assistant to diverge over time. See this feature request for concrete user stories.

Unfortunately, Home Assistant lacks a functionality to re-acquire the current names from the integrations.

Some forum ports that are related to the problem:

I appreciate any feedback and comments!