Inserted options of dropdown disappear after Deploy

I am inserting some options for a dropdown node.
Everything went fine, until the next deploy, then the options of the dropdown are gone and the dropdown has empty selections (options).
When i then insert the options again, they are not taken over.
If i put in the options directly by hand into the dropdown node and do a deploy and then the insertion of the options, it works.


Please create a small flow demonstrating the issue and paste it to a reply so we can look at it.

flows.json (4.3 KB)

Here ist the flow^

And here the incoming data from MQTT:

      "options": [{"Markus": "Markus"}, {"Katha": "Katha"}],
      "selection": ['Markus', 'Katha'],
      "room": 'sz',
      "type": "co2"

Ha, this took me a bit to find. If you look at the `change nodes you have this:

Screenshot 2023-09-28 at 4.28.31 PM

So the first thing you do is set msg.payload to msg.payload.selection

then you try to set msg.options to msg.payload.options but at this point there is no msg.payload.potions because you just wiped it out.

If you swap the order of the two actions (set msg.options to msg.payload.options first) the correct data will be in the msg.

This is where adding `debug' nodes is a valuable problem solving tool.

ALSO, you should change the single quotes

"selection": ['Markus', 'Katha'],

to double quotes in the code that is publishing that data.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.