Hi guys,
I have a simple question.
I have a node calculating values and generating an on/off comand, that works works fine.
Now I want to block the command if a switch from the UI is false. How do I have to do this?
[{"id":"58b13ec1.6e319","type":"ui_switch","z":"d719370b.e5d548","name":"","label":"Smart Charge","tooltip":"","group":"6b8a6c67.042ff4","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":140,"y":320,"wires":[["e1067a88.af1748"]]},{"id":"a30aba8e.2e1ed8","type":"debug","z":"d719370b.e5d548","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":830,"y":600,"wires":[]},{"id":"e37457d1.603df8","type":"mqtt in","z":"d719370b.e5d548","name":"","topic":"/PV/AC_Power","qos":"2","datatype":"auto","broker":"72a511b3.b8702","x":180,"y":600,"wires":[["e1067a88.af1748"]]},{"id":"e1067a88.af1748","type":"function","z":"d719370b.e5d548","name":"","func":"var conv = parseFloat(msg.payload)\nif (conv>=1250) {\n msg.payload=\"ON\"\n} else {\n msg.payload=\"OFF\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":480,"wires":[["a30aba8e.2e1ed8"]]},{"id":"6b8a6c67.042ff4","type":"ui_group","name":"E_Auto","tab":"a5fa57f2.6a9058","order":1,"disp":true,"width":"6","collapse":false},{"id":"72a511b3.b8702","type":"mqtt-broker","name":"MQTT Mosquito Node-RED machine","broker":"192.168.178.204","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"a5fa57f2.6a9058","type":"ui_tab","name":"Lade Steuerung","icon":"dashboard","disabled":false,"hidden":false}]