Node-RED does not update auto-complete data for entity ids #407
Jpsy posted onGitHub
Problem/Motivation
The Entity Id fields in several HA nodes provide an auto-complete feature that does a speed-match against all known HA entities while typing into the field. But there seems to be a problem to update the entities list that is used for this match.
Expected behavior
When entities are added / remove / renamed in HA, these changes should reflect in the Node-RED auto-complete.
Actual behavior
Node-RED continues to use old and outdated entity Ids to do the speed match. This behavior has been described by several users. Some examples: https://www.reddit.com/r/homeassistant/comments/ad2kb3/when_you_change_entity_names_how_do_you_refresh/ https://community.home-assistant.io/t/node-red-auto-complete-not-working/122901/2
Restarting Node-RED or HA or the whole system does not update the entities either.
Workaround: A re-sync of the entities list can be forced by starting the Node-RED add-on without Protection mode. This results in an updated entities id list and auto-complete is up-to-date again. <strike>Switching on Protection mode freezes the list again so that it out-dates again over time.</strike>
Steps to reproduce
- Hass.io with some entities and Node-RED installed
- Change / add / remove some entities in HA
- Check Node-RED auto-complete again to see that auto-complete has not updated it's entity id list.
Proposed changes
Update entities list in Node-RED at least with each new start of HA or of Node-RED. This should happen in the same way as it does with Protection mode switched on.
<blockquote><img src="https://www.redditstatic.com/new-icon.png" width="48" align="right"><div><img src="//www.redditstatic.com/desktop2x/img/favicon/favicon-16x16.png" height="14"> reddit</div><div><strong><a href="https://www.reddit.com/r/homeassistant/comments/ad2kb3/when_you_change_entity_names_how_do_you_refresh/">When you change entity names, how do you refresh them in Node-Red?</a></strong></div><div>A regular restart of HA doesn't seem to do it. Do you need to restart the Node-Red docker or is there a way inside node-red to re-read the Home...</div></blockquote> <blockquote><img src="https://community.home-assistant.io/user_avatar/community.home-assistant.io/fxcoolby/200/68424_2.png" width="48" align="right"><div><img src="https://community-home-assistant-assets.s3.dualstack.us-west-2.amazonaws.com/optimized/3X/f/4/f42b82971fce994297fbc2b269efa248beef897b_2_32x32.png" height="14"> Home Assistant Community</div><div><strong><a href="https://community.home-assistant.io/t/node-red-auto-complete-not-working/122901/2">Node-RED auto-complete not working</a></strong></div><div>Have you tried to look into the logs, both for your HA and Node Red addon? This is not normal.</div></blockquote>