Hi,
I am using the msg topic to make number substraction or sum. Here you have the flow that I am using to make my equation but I get NaN all time. Could you please help me.
[{"id":"51e16efc.60bc","type":"inject","z":"10870198.997aae","name":"","topic":"T1","payload":"25","payloadType":"num","repeat":"1","crontab":"","once":false,"onceDelay":"","x":220,"y":240,"wires":[["733fb56c.441bec"]]},{"id":"6679dccc.8b7084","type":"debug","z":"10870198.997aae","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":280,"wires":[]},{"id":"f6b2bee9.1dbef","type":"function","z":"10870198.997aae","name":"Subtraction","func":"msg.payload = msg.payload.T2 - msg.payload.T1\nmsg.topic=\"Tf\";\nreturn msg;\n","outputs":1,"noerr":0,"x":610,"y":280,"wires":[["6679dccc.8b7084"]]},{"id":"733fb56c.441bec","type":"function","z":"10870198.997aae","name":"T1","func":"msg.topic=\"T1\";\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":240,"wires":[["f6b2bee9.1dbef"]]},{"id":"f0a8bd35.2b1dc","type":"inject","z":"10870198.997aae","name":"","topic":"T2","payload":"21","payloadType":"num","repeat":"1","crontab":"","once":false,"onceDelay":"","x":220,"y":300,"wires":[["10bb1e8c.d14f31"]]},{"id":"10bb1e8c.d14f31","type":"function","z":"10870198.997aae","name":"T2","func":"msg.topic=\"T2\";\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":300,"wires":[["f6b2bee9.1dbef"]]}]