def update_entity_unique_id(entity_entry: er.RegistryEntry) -> dict[str, str] | None:
            """Update unique ID of entity entry."""
            if entity_entry.unique_id.startswith(f"{DOMAIN}_bidcos_wir"):
                return {
                    "new_unique_id": entity_entry.unique_id.replace(
                        f"{DOMAIN}_bidcos_wir",
                        f"{DOMAIN}_{entry.unique_id}_bidcos_wir",
                    )
                }
            return None
Update unique ID of entity entry.
custom_components/homematicip_local/__init__.py