Help: Renaming Node Red Switch adds another switch

I have created a switch for my Panasonic TV in Node Red, (Panasonic Tv switch) but when I renamed it(Panasonic Tv power) it created another switch in Home Assistant rather than renaming.

How can I stop this happening again and what is the best way of removing the orphan switch as it is obviously not showing in Node Red

If you are using the entity node then it does that to me too sometimes.
I usually delete the node and create a new one and it does’t happen.

Thanks. Yes I am using the entity Node. Just tried this and it created yet another switch and still did not delete the other two orphaned switches.

I then deleted them from within Node Red Companion and pressed reload but it then proceeded to duplicate every other switch. Aahhh! :slight_smile:

EDIT: Deleting them and restarting HA fixed the trick for the Panasonic TV switches however all my other switches are still now switch.*_2

Just click on the entity from a dashboard, go to it’s settings and rename by deleting _2 and saving