Node red plus every payload number that comes in

Hi,

I would like to know if there would be a way that i could plus every payload that comes through?
I have a rain sensor and at the end of the day i would want to plus it together for a month so i could calculate a monthly rainfall. Is this at all possible or would i need to somehow store the number somewhere for it to get it from?

Thanks

You would need to store it somehow.
You can store it in HA as an input_number or in NodeRed as a flow or global variable.
Since it is actually a number that is used over a longer period of time, then I suggest using the HA input_number, because it will keep the value on reboots and other events.
I bet there are some of the Node Red wizards here that can give you a line to put into the data field of a service call to input_number.set_value, so the line will pull the current value of the input_number and add the new measurement.

Could Get History be used to fetch the values for the rain sensor entity then you could use a function to sum the values for the date range you want?