Idea: Alternative Indicator Options for Switch Node

By using the switch node without passing through the messages from the input to the output, it is possible to display either the status of the input or the output.
No matter which option I choose, this leads to the fact that I keep the same message at the output by repeatedly clicking the switch, until also the input has changed. In addition, I do not see until then whether the switch was switched.
Example:

[{"id":"29b93080.aaef98","type":"debug","z":"68c5fa6.c363884","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":160,"wires":[]},{"id":"1a543b1f.8e8aad","type":"ui_switch","z":"68c5fa6.c363884","name":"","label":"switch","tooltip":"","group":"c18a685f.804ea","order":3,"width":"4","height":"1","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":320,"y":160,"wires":[["29b93080.aaef98","bc4fe821.e05f9"]]},{"id":"bc4fe821.e05f9","type":"trigger","z":"68c5fa6.c363884","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":true,"units":"s","reset":"","bytopic":"all","name":"trigger 10s","x":330,"y":80,"wires":[["1a543b1f.8e8aad","266c2889.2c777"]]},{"id":"266c2889.2c777","type":"ui_text","z":"68c5fa6.c363884","group":"c18a685f.804ea","order":4,"width":"2","height":"1","name":"","label":"","format":"{{msg.payload}}","layout":"row-spread","x":490,"y":80,"wires":[]},{"id":"410e7d38.16a6c4","type":"inject","z":"68c5fa6.c363884","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":80,"wires":[["bc4fe821.e05f9"]]},{"id":"2b8153a2.f37804","type":"inject","z":"68c5fa6.c363884","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":120,"wires":[["bc4fe821.e05f9"]]},{"id":"c18a685f.804ea","type":"ui_group","z":"","name":"Level","tab":"ee5c0835.2b15d8","disp":true,"width":"6","collapse":false},{"id":"ee5c0835.2b15d8","type":"ui_tab","z":"","name":"Test","icon":"dashboard","order":8,"disabled":false,"hidden":false}]

Once I clicked the switch, I can not go back.

It would be better if there was an indicator option that always displays the last status change from the input or the output. I can simulate this by inserting a Function Node:

[{"id":"9602f11a.505e1","type":"debug","z":"30d0b04e.2bee5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":160,"wires":[]},{"id":"cbaaceb8.bb272","type":"ui_switch","z":"30d0b04e.2bee5","name":"","label":"switch","tooltip":"","group":"c18a685f.804ea","order":1,"width":"4","height":"1","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":300,"y":160,"wires":[["9602f11a.505e1","dbabb451.158e38","88d5669d.1910c"]]},{"id":"dbabb451.158e38","type":"function","z":"30d0b04e.2bee5","name":"return msg","func":"return msg;","outputs":1,"noerr":0,"x":330,"y":240,"wires":[["cbaaceb8.bb272"]]},{"id":"88d5669d.1910c","type":"trigger","z":"30d0b04e.2bee5","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":true,"units":"s","reset":"","bytopic":"all","name":"trigger 10s","x":310,"y":80,"wires":[["cbaaceb8.bb272","c0507873.a65c58"]]},{"id":"c0507873.a65c58","type":"ui_text","z":"30d0b04e.2bee5","group":"c18a685f.804ea","order":2,"width":"2","height":"1","name":"","label":"","format":"{{msg.payload}}","layout":"row-spread","x":480,"y":80,"wires":[]},{"id":"6e40fd98.424dfc","type":"inject","z":"30d0b04e.2bee5","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":80,"wires":[["88d5669d.1910c"]]},{"id":"70f88409.1d205c","type":"inject","z":"30d0b04e.2bee5","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":120,"wires":[["88d5669d.1910c"]]},{"id":"c18a685f.804ea","type":"ui_group","z":"","name":"Level","tab":"ee5c0835.2b15d8","disp":true,"width":"6","collapse":false},{"id":"ee5c0835.2b15d8","type":"ui_tab","z":"","name":"Test","icon":"dashboard","order":8,"disabled":false,"hidden":false}]

Now I can go back before the timer expires. This is e.g. helpful when arming an alarm.

Even better, however, would be an indicator option that considers all four possible states of the switch node:

ON - ON: Switch colored and slider right
ON - OFF: Switch colored and slider left
OFF - ON: Switch gray and slider right
OFF - OFF: Switch gray and slider left

The switching of the output should then also be independent of the status of the input with each click.

Harald

Hi, there is currently a bug in the latest release. This has been fixed in master but not yet released to npm

Hi, I have (manually) updated to the latest release now, but it doesn't make any difference. It only corrects an issue if "Switch icon shows state of the output" is selected. But this is not the case with my flow(s). I still think the proposed additional indicator option could make sense.
Many thanks, Harald

You can use msg.disabled to get it grey and be disabled