Likely, this question is asked somewhere already, please help to locate the answer.
I have slider (or numeric) UI node and a switch UI node at the same group in the flow. From this guide I understand that somehow I can write a function which can read slider or numeric node value by switch click.
Slider -- Switch -- Function -- Trigger -- MQTT
Maybe the wiring of nodes is not correct for the purpose. Please, advise.
In the function I tried to read the slider value as following examples:
- node.log(flow.get(‘slider’)||‘nc’);
- node.log(flow.slider.value||‘nb’);
- node.log(flow.slider.msg||‘nd’);
- node.log(context.get(‘slider’)||‘na’); // not expected to work
None of these works. I am missing basic understanding of Node-RED: how to read status of other node (from slider) in the flow? How to set specific value to other node (to trigger) in the flow?
Please, help.