hass-node-red
hass-node-red copied to clipboard
Node Red companion entities being duplicated on occasion after host reboot.
Try
unload the companion integration
reboot HA
remove all the entities that are associated with the exposed node
reboot HA
add back the integration
check to see if a entity was created with the correct id minus the
_2restart NR
check if it created a new entity in HA or used the correct one
Originally posted by @zachowj in #126
This works to resolve the issue. But is there any way to prevent this from happening in the first place?
I'm on HA version: 2025.2.5 Companion version: 4.1.2 Node Red version: 19.0.2
Running HA inside a virtualbox VM hosted on a Windows 10 machine. This seems to happen when I reboot the VM. But it doesn't happen consistently. I always shut it down with an ACPI shutdown.
I found I can reproduce this 100% of the time if I Rename the NR Companion Integration from "name" to something else. It has also happened/been triggered other ways, but this is the most reliable.
Restarting, then disabling, then restarting, then enabling, then restarting, seems to clear it (remove the _2 items) but it could be a fluke fix. I know the other issue/thread has more info on the fix.
I see renamed if i just restart Node-RED Companion in Home assistant (config/integrations/integration/nodered) Can i fix it?
Can Anybody fix it? I have Many devices and i need rename all them in HA everyday. It is crazy.
Absolutely crazy bug this is... If you rename it in core.config_entries it doesn't make the duplicate entities. I'm guessing when you rename the config item it starts creating the new one with the new name before it has deleted the old one and its entities, resulting in duplicates.
Absolutely crazy bug this is... If you rename it in core.config_entries it doesn't make the duplicate entities. I'm guessing when you rename the config item it starts creating the new one with the new name before it has deleted the old one and its entities, resulting in duplicates.
Can you create an manual how i need do it? I not understand where i can found core.config_entries.
Is it possible to set the entity id number to be a portion of the hash of the entity id string?
This bug is also triggered by renaming or deleting entities in NR. Another fix I've found is:
- Delete the old (original) entities using the recorder.purge_entities action in HA dev tools
- Restart HA
- Rename all NR entities to remove the _2
But it's a huge pain, especially if you have a lot. One of my setups has 68 NR entities 😩
Nothing worked. I tried EVERYONE'S suggestions and there is no way to remove from the UI, and when I tried manually deleting the storage entity registry items they all came back again. I'm completely stuck please help!
ALL I DID WAS REMOVE A HA SENSOR FROM NODE RED!
Same issue here... deleting the entities and adding NodeRed again still has _2 next to some of my entities...
And here we are, Oct 2025 and this integration is still wobbly
Personally I've had it with the junk double entities it creates and never cleans up. The worst is that you can't even get rid of things manually and restart, reload does nothing.
As a consequence I have begun migrating to MQTT based sensors, which I can still update from Node Red, and use HA helpers for everything else. It will be a nice day when I can nuke this integration for good 👎