Remove old entities created by NodeRed API node

HI guys.

I have a node red flow that creates + updates entities based on some local sports scores.

When HA restarts, a lot of these nodes become unavailable. They are old games and are no longer relevant.

Short of removing them manually, is there an easy way to delete them via the node red flow ?

I can get a list of all the entities i want using get entities, but not sure how to actually remove them.

TIA!

Did you ever find a solution to this?

No, I haven’t.

Thanks.

I think I’ll have to revert to manually editing the Home Assistant files. If you want to remove devices or entities but the GUI doesn’t let you, you can remove the entities from these files: ../config/.storage/core.device_registry
../config/.storage/core.entity_registry

Just remember to make a backup of the files first :wink:

This in my opinion is a massive barrier to participation. Im new to HA and node red and naturally experimenting with tons of different nodes, entities, integrations and devices.
My setup is getting messier by the second and having to edit a load of config files that i don’t really understand is not user friendly.
Its odd as the rest of the UI is generally pretty good, i hope easy management of the above can be implemented moving forward.

After you remove the node, if the entity still persists in HA. First go to the integration and select the nodered entities. Go to the configuration page → integrations → nodered → entities.

You will get a list of entities created by nodered, select the entity and delete.

P.S. If it still shows as enabled in the list, you haven’t deleted the node. Use the search in nodered to find the right node.

1 Like

If you have deleted the Entity in the flow. You can either restart HA, or go to Integration → Node-RED → Three dots → Reload.

This removed all the old test Entity stuff that I created from my flows at least.

2 Likes

Did work for me. Just search for “config” in node red and youll get a list of config nodes, which also declares if a nodes is still in use (=entity from node-red companion still present in a flow). If not, just double click, delete- restart. done!!