Delete entities from a flow

Hi all!
Long story short, i have a flow that dyamically creates entities based on some information from an API.

Is there a way i can make this same flow delete these entities – or atleast delete a specific entity ?

Long story short, not enough info to answer this.

What if I shortened it to “Can I delete a HA entity from a NodeRed flow via API or some other way” ?

That’s clear :slight_smile:.

I think you must find an answer for that without the node red part…

I found:

Via the node red entity nodes you can create specific entity’s:

But these are only the ones you can create/delete with this code. Not all entities…

Thanks! You certainly had better luck finding things than i did!

I am still struggling with this.

I have a node red flow that registers and updates sensors, using an API node

{
   "type":"nodered/discovery",
   "server_id": serverId,
   "node_id": nodeId,
   "component": "sensor",
   "config": {
       "name": name
   }
}

Surelyt theres an easy way to “un-register” that sensor ?