-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Remove sensor from Node Red should also remove from HA #217
Comments
Yes, sensors and switches should automatically be removed from HA when they are removed from NR, but only if there is a current connection from NR to HA when you deploy those changes. Documentation is definitely lacking here most of it is in the NR package release notes or in the NR docs. The switches can be created from any of the event nodes, events:all, events:state, trigger:state, and poll state nodes, using the expose https://community.home-assistant.io/t/node-red-contrib-home-assistant-websocket/71032/389?u=kermit |
To verify entity deletion i made a test switch entity and deployed it. The entity shows up and I can toggle it from HA. I then deleted the entity from the node red flow. The entity then changes to unavailable state. It doesn't get removed. There was a valid connection from NR to HA when I deployed the change with the entity deleted. Also, I am unable to remove the entity using the UI controls. |
@declanshanaghy: hello! 👋 This issue is being automatically closed because it does not follow the issue template. |
hmm well, that wasn't supposed to happen. |
Just updated the plugin in node-red. I have the same problem. |
What do your HA logs show? Turn on debugging for the component.
|
no errors from nodered component only. Only the creation of the switch is logged. hass = 0.106.5 `2020-03-11 16:53:11 DEBUG (MainThread) [custom_components.nodered.discovery] Discovery message: {'type': 'nodered/discovery', 'server_id': 'jcodjco', 'node_id': 'eked', 'component': 'switch', 'state': True, 'config': {'name': 'nodetest'}, 'id': 15} 2020-03-11 16:53:11 INFO (MainThread) [custom_components.nodered.discovery] Creating switch blablabla 2020-03-11 16:53:11 INFO (MainThread) [homeassistant.components.switch] Setting up switch.nodered 2020-03-11 16:53:11 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.nodered entity: switch.nodetest_2` |
@Webserve What is your deploy mode set to? Full, Modified Flows or Nodes |
Full. Sorry for the late answer. Something with corona... |
I'm having the same problem. I delete an entity and it stays around. It really sucks because my entity is named with random characters I typed on the keyboard for testing. I didn't know an entity node would be permanent. I would expect the nodered integration to automatically delete items when they are deleted in node-red container. |
Same for me on HA supervised ( |
I just figured out that if you restart HA after you deleted the entities in Node-Red you can delete the now as |
so the solution is to restart home assistant? there's no way to delete unused entities from nodered without restart? |
I could not find a different solution so far |
I am having the same issue. A restart did not work. |
still no solution for this ? |
@twobeass create a new issue |
Same here. Cant delete unused entity |
And now both issues are closed. This one because a 2nd was created. And the 2nd because of no activity. Please re-open |
Is your feature request related to a problem? Please describe.
When i deleted a sensor from Node Red it was not deleted from the integration. I created another one with the same name but now there are 2 sensors in the integration and the second one is suffixed with "_2". Hence I now seem to have lost control of the first one.
Describe the solution you'd like
Deleting the sensor from node red should delete it from the integration into HA
Describe alternatives you've considered
After HA restart the first sensor was unavailable so i was able to remove it, this is cumbersome though. HA can take a few minutes to restart
Additional context
The README doesn't provide any insight on the expected behaviour. It also shows controlling a switch, but there is no switch component in the integration only binary/sensor. It would be helpful to document how to setup a switch as shown in the README.
The text was updated successfully, but these errors were encountered: