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

Ghost entities, not in flow.json, how to delete? #81

Closed Swiftnesses closed 2 years ago

Swiftnesses commented 2 years ago

I've tried literally everything from manually deleting them from the HA entities file, to deleting the integration.

My flows.json only has one 'ha-entity' type node, so I have no idea where all these switches are coming from...?

Any idea how I can stop them appearing?

Screenshot 2021-10-03 at 19 10 36

?

zachowj commented 2 years ago

Do you have any event nodes exposed HA? events: state, poll state, or trigger: state nodes?

Swiftnesses commented 2 years ago
Screenshot 2021-10-03 at 19 26 39

Like these? If so, yes, lots of them... I have around 30 flow tabs, hundreds of flows...

Swiftnesses commented 2 years ago

Argh, I just noticed the check box "expose to home assistant" - not seen this before.

I'll check them, is there a quick way to do this?

zachowj commented 2 years ago

With the Expose to Home Assistant Checked?

You can find the nodes that are creating the entities by using the Find feature in NR. Type in the first 3-4 characters from the entity after nodered_adc5b4c38.... Search for adc54

Swiftnesses commented 2 years ago
Screenshot 2021-10-03 at 19 32 21

Got them, it looks like the new device trigger node causes this...

zachowj commented 2 years ago

Yes, device nodes are automatically exposed to HA because they use HA device automation to process the request.

Swiftnesses commented 2 years ago

Okay, it's a little confusing as they're not strictly used by the companion or the entity node, will this behaviour change in the future?

zachowj commented 2 years ago

Can you explain a little more about what is confusing about them? They work the same way the events nodes do except that they are always exposed to HA. Which gives them the ability to be enabled/disabled and triggered from HA.

I don't see this changing in the future.

Also, if you fill in the name field in the HA config box before you first deploy the node it will attempt to create the entity id with that name and not the node id as the entity id.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.