For all my SONOFF switches (~30pcs) I use “Subflow” for simplicity and decrease the complexity for my Dashboard 1.0. The “Subflow” includes a lot of functions e.q. ON/OFF, Timer, detect “On/Offline” state, enable “Locked” ON/OFF-button, custom color with CSS) by using “Environment variable”.
The text label and MQTT Topic is defined with “Environment variable” and sent from the “Function” node to the “Switch” node. See flow
Subflow: MQTT-IN node => FUNCTION node => SWITCH node => MQTT OUT node
Subflows “Environment variable” MyLabel = ”Living room lamp”
“Function” node: msg.MyLabel2 = env.get("MyLabel")
“Switch” node: Input field is “{{MyLabel2}}"
Problem: When I try to convert old Dashboard to FlowFuse’s Dashboard2.0, the “Switch”-node doesn’t read the {{msg.MyLabel2}} message in the “Label”-field.
Q: Doesn’t “Dashboard2.0” support to set the “Switch”-node label with value of {{msg.topic}} ?
Q: If it’s not supported, is there any other solution to set the label in the “Switch”-node ?
P.S: Using NodeRed v4.0.0, NodeJs v18.20.5, Linux 6.1.0-30-amd64 x64 LE, Linux Mint LMDE