Skip to content

Node Red companion entities being duplicated on occasion after host reboot. #333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Shaolo opened this issue Feb 22, 2025 · 5 comments
Open

Comments

@Shaolo
Copy link

Shaolo commented Feb 22, 2025

Try

  1. unload the companion integration

  2. reboot HA

  3. remove all the entities that are associated with the exposed node

  4. reboot HA

  5. add back the integration

  6. check to see if a entity was created with the correct id minus the _2

  7. restart NR

  8. 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.

@amaisano
Copy link

amaisano commented Mar 26, 2025

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.

@userosos
Copy link

userosos commented Apr 3, 2025

I see renamed if i just restart Node-RED Companion in Home assistant (config/integrations/integration/nodered)
Can i fix it?

@userosos
Copy link

userosos commented Apr 22, 2025

Can Anybody fix it? I have Many devices and i need rename all them in HA everyday. It is crazy.

@daveyijzermans
Copy link

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.

@userosos
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants