This post is old but it’s the first that showed up in Google when I had this same question. What worked for me was deleting the Google Cast device entries from /config/.storage/core.device_registry, /config/.storage/core.entity_registry, and /config/.storage/core.config_entries.
I removed them, ensured google_cast devices were set to ignore in the discovery component, then restarted the server. This succeeded in getting rid of the discovered Google Cast devices.
/config/.storage/core.device_registry entry:
{
"area_id": null,
"config_entries": [
"8ea7a6d9398449949e97c6440de9f975"
],
"connections": [],
"hub_device_id": null,
"id": "63d02448ddbd4a0baeaf0152484f13a5",
"identifiers": [
[
"cast",
"280202ce3ee91d86471ac2ff61ff8d42"
]
],
"manufacturer": "Google Inc.",
"model": "Google Home Mini",
"name": "Bathroom Speaker",
"sw_version": null
},
/config/.storage/core.entity_registry entry:
{
"config_entry_id": "8ea7a6d9398449949e97c6440de9f975",
"device_id": "ccc079b234f74a4a9d28cc2da1c71fee",
"disabled_by": null,
"entity_id": "media_player.bedroom_speaker",
"name": null,
"platform": "cast",
"unique_id": "5322ac78-e1fd-7050-cea8-a2b132aaeeec"
},
/config/.storage/core.config_entries entry:
{
"connection_class": "local_push",
"data": {},
"domain": "cast",
"entry_id": "8ea7a6d9398449949e97c6440de9f975",
"source": "discovery",
"title": "Google Cast",
"version": 1
}