zachowj / hass-node-red

Companion Component for node-red-contrib-home-assistant-websocket to help integrate Node-RED with Home Assistant Core
MIT License
460 stars 182 forks source link

How do I remove an entity created with this? #46

Closed jayheavner closed 3 years ago

jayheavner commented 3 years ago

How do I remove/delete/destroy an entity that I add this way? I tried deleting it from flow (I didn't really think that would work and it didn't).

zachowj commented 3 years ago

As long as you don't have deploy on Full the entities should be removed from HA after you have deleted the entity node from NR and deployed. If you have the deploy on Full the connection typically gets reset before the removed node has a chance to remove itself from HA.

jayheavner commented 3 years ago

I'll test that. If I have deleted a node and done a full deploy and it didn't delete the sensor in HA, can I recreate the node with the same name, deploy, delete, deploy single or is that just going to create a duplicate node and delete that?

zachowj commented 3 years ago

No creating a new node will create a new sensor in HA. You can use the entity manager in HA to remove old entities.