Here is another way to do it.
[{"id":"dc03d983.08016","type":"inject","z":"2a10ff07.234f98","name":"Start at morning","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":640,"wires":[["a7d099e2.a9ef1","b1f4786b.55af"]]},{"id":"a7d099e2.a9ef1","type":"function","z":"2a10ff07.234f98","name":"Get rain value","func":"msg.payload = 2;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":640,"wires":[["fe562e34.d05758"]]},{"id":"b1f4786b.55af","type":"delay","z":"2a10ff07.234f98","name":"Delay to afternoon","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":120,"y":690,"wires":[["2f0ca91a.61cd8e"]]},{"id":"fe562e34.d05758","type":"join","z":"2a10ff07.234f98","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":550,"y":640,"wires":[["92d6d5d5.f38818"]]},{"id":"92d6d5d5.f38818","type":"function","z":"2a10ff07.234f98","name":"Compare","func":"let difference = (msg.payload[1] - msg.payload[0]);\nmsg.payload = difference;\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":690,"wires":[["7f6d53af.f083cc"]]},{"id":"7f6d53af.f083cc","type":"debug","z":"2a10ff07.234f98","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":720,"y":690,"wires":[]},{"id":"2f0ca91a.61cd8e","type":"function","z":"2a10ff07.234f98","name":"Get rain value","func":"msg.payload = 20;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":690,"wires":[["fe562e34.d05758"]]},{"id":"f136ec43.d281e","type":"comment","z":"2a10ff07.234f98","name":"Read me *","info":"The two `function` nodes are here only to simulate getting the readings.\nYou will have to use your nodes here and the signal is to get the node to send out an output.\nActually you would only need one node. I use two to return two values so as to show how it works.\n","x":350,"y":600,"wires":[]}]
You use the code posted by clicking to the left of the area and click on the clipboard icon which will appear.
Go to your node-red
edit screen, select IMPORT
and paste the code there.
That is the top right corner the burger (menu) button in Node-Red
.