How to remove unwanted entities?

I paced bluetooth low energy in my config yaml and it found a lot of device tracker entities. They do not have unique IDs and cannot be edited. I removed ble from my config and restarted, but the entities are still there. How can I remove them? I haven’t used any in automations. Thanks.


Maybe this is of any help:

Are they listed in Configuration → Devices and Services → Entities?

If they are, look at the icon in the entity’s rightmost column. If it’s a red dot with an exclamation mark, click it and the resulting popup should offer a Delete button.

They are listed in Settings>Devices>Entities, but the icon is of a lined-through pencil, indicating read-only.

These are not listed in either registry, example of one being ble_01_9b_ae_e2_c9_eb. They are listed in a file called known_devices.yaml, which I thought was being deprecated. Should I delete them from there?

I deleted them from known_devices and, after a couple of restarts, they went away.


I don’t have any file named ‘known_devices.yaml’ is there any other fix?

I experience the same problem, especially after updates or reboots. However, I have found a solution for myself, combining the different recommendations here in the board. I’ll try to summarize:

  1. I try to identify the unwanted entities by their name in the database, especially entities with _2 or _3 at the end
  2. I go to “Development tools” → “Services” and select “Purge Entities”
  3. I select the entities I want to remove, sometimes I select the correct entities and the corresponding entites with _2 and/or _3, eg. sensor.test and sensor.test_2. I’m not sure if this is necessary.
  4. After having selected all entities I execute the service
  5. I reboot HA and close the browser (or clear the browsers cache)

After HA is up again, in most cases the unwanted entities are gone!


I was just struggling with this too with a template fan that I had in config.yaml. What finally worked for me:

  1. Add the template entity (or at least something that will have the same entity ID) back to the yaml file it came from.
  2. Then do a “quick reload” of the yaml configurations. (A full restart would probably also be fine here.)
  3. Then delete the template entity from the yaml file, and then do another “quick reload”. (DO NOT do a restart here before the “quick reload”.)
  4. Now the entity should be gone, and you’re free to do a full restart and it won’t come back!

Seems like a really obscure bug, but maybe they can fix it.


Isn’t there an integration or hacs / add-on that finds inconsistencies in code/orphaned items?


On a related topic, I also activated the bluetooth BLE device tracker and I now have hundreds of entities that I am stuck with. I’d love to say I’m exaggerating, but I can barely believe it myself. There are literal hundreds of entities. Any idea how to bulk delete them?


check if you have the “known_devices.yaml”
They come from this file delete them and you should be good.
Check the device_tracker settings and ensure it doesn’t add new devices, otherwise it will add every car and drivers phone and any other device with bluetooth enabled that drives by at your house


None of the methods above worked for me. Where is known_devices.yaml located? I read that known_devices.yaml was being phased out?