I am having an issue with a dashboard switch node that I have been unable to resolve. I have successfully used the disable/enable message on the input of a switch to prevent a toggle if it occurs within a certain amount of time after the last change. In this particular case I am turning a video projector on and off and need to allow warm up and cooldown times before making another change, but that's really besides the point.
Now when I set enable to False, it also sets the switch to Off. This means I cannot send an Off command, because after the switch is enabled again it sends the On command again the next time it is toggled.
I added a debug node after the change node and thought that was the issue because I am getting a msg.payload of "undefined" when I believe I should not have been getting any msg.payload at all. I even added an explicit msg.payload Delete and still get and undefined msg.payload passed through.
However, I made another switch and injected the msg.enabled True and False and although the undefined payload is gone the dashboard switch behavior is the same.
Here is a simple example. Is this a bug or am I just missing something obvious?
I am running Buster on an RPi3B
[info] Node-RED version: v0.20.7
[info] Node.js version: v10.16.0
[info] Linux 4.19.58-v7+ arm LE
[{"id":"b7ce1316.fba4b8","type":"debug","z":"94a49731.2d9ba8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":810,"y":280,"wires":[]},{"id":"40f5c1cc.3e6c28","type":"ui_switch","z":"94a49731.2d9ba8","name":"","label":"switch","tooltip":"","group":"6ad83db.c98ed44","order":20,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"projSystemOn","onvalueType":"str","onicon":"","oncolor":"","offvalue":"projSystemOff","offvalueType":"str","officon":"","offcolor":"","x":390,"y":240,"wires":[["7c2b7503.fd7d7c"]]},{"id":"8026106.7e5f17","type":"change","z":"94a49731.2d9ba8","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"enabled","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":300,"wires":[["fd0cbe4d.822658","b7ce1316.fba4b8","40f5c1cc.3e6c28"]]},{"id":"fd0cbe4d.822658","type":"debug","z":"94a49731.2d9ba8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"enabled","targetType":"msg","x":810,"y":320,"wires":[]},{"id":"7c2b7503.fd7d7c","type":"trigger","z":"94a49731.2d9ba8","op1":"false","op2":"true","op1type":"bool","op2type":"bool","duration":"5","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":260,"y":300,"wires":[["8026106.7e5f17"]]},{"id":"bc19148f.0e864","type":"debug","z":"94a49731.2d9ba8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":810,"y":400,"wires":[]},{"id":"dc1ded8b.a26c4","type":"ui_switch","z":"94a49731.2d9ba8","name":"","label":"switch","tooltip":"","group":"6ad83db.c98ed44","order":20,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"projSystemOn","onvalueType":"str","onicon":"","oncolor":"","offvalue":"projSystemOff","offvalueType":"str","officon":"","offcolor":"","x":590,"y":400,"wires":[["bc19148f.0e864"]]},{"id":"44aeed9d.acc3bc","type":"debug","z":"94a49731.2d9ba8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"enabled","targetType":"msg","x":610,"y":460,"wires":[]},{"id":"a078746b.602588","type":"inject","z":"94a49731.2d9ba8","name":"Enable Switch","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":380,"wires":[["167e0e37.ac4282"]]},{"id":"c6566488.58f848","type":"inject","z":"94a49731.2d9ba8","name":"Disable Switch","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":420,"wires":[["4742104d.9c9548"]]},{"id":"167e0e37.ac4282","type":"change","z":"94a49731.2d9ba8","name":"Enabled is True","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":380,"wires":[["dc1ded8b.a26c4","44aeed9d.acc3bc"]]},{"id":"4742104d.9c9548","type":"change","z":"94a49731.2d9ba8","name":"Enabled is False","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":420,"wires":[["dc1ded8b.a26c4","44aeed9d.acc3bc"]]},{"id":"6ad83db.c98ed44","type":"ui_group","z":"","name":"Projector","tab":"fb2aadc5.d87d1","disp":true,"width":"6","collapse":false},{"id":"fb2aadc5.d87d1","type":"ui_tab","z":"","name":"Home AV","icon":"dashboard"}]