Open W-e-e-Z-e-l opened 6 days ago
I just opened an issue which is the same problem I think - if you make use of "expose as" on nodes such as events-state to create a switch in HA that can be used to enable/disable the node, then when you edit a new node, it is now defaulting to the first switch in the list rather than "none".
https://github.com/hassio-addons/addon-node-red/issues/1900#issue-2368554934
Oh, good hint! You are right! I didnt notice the "expose as" feature on the nodes...they were set to an entity i have in my environment, but after switching the "expose as" back to "none" the nodes works as expected. Great workaround at least for me :)
Hmm, there is weird stuff happening around the "expose as" feature...even after manually switching back to "none" the feature set itself again to the first entity in the list after a while.
It seems to need setting back to none every time you edit the node. What I think is happening is in the previous version of node red, the "none" was at the top of the pull down list, so if you hadn't set it explicitly, it picked none every time you edited. Now, none appears at the end of the list. So if you haven't explicitly set it, every time you edit the node, it is picking up the first entry, which is no longer "none". I am not seeing it changing by itself, but if I edit an existing node that used to be "none", it is picking the first entry every time. If you are going to save the node, you have to set it back to none every time. If you go back in to edit on a node you previously set to "none", it will display wrong, but if you don't save it, it's ok.
Yep, seems like this. To get rid of the trouble of changing the "expose as" repeatedly, i created a virtual switch and named it "A". The "expose as" list is in alphabetical order. This should do the trick until the problem is permanently fixed.
Neat work around. "none" is being explicitly put at the end of that list, wherever it is coming from - I created a switch called zzzz but "none" still came after it, so it is being added there deliberately somewhere. I am 90% sure it used to be at the top. I think that's what is breaking it.
Problem/Motivation
Expected behavior
Actual behavior
Steps to reproduce
Proposed changes