Hi
I have the following function as part of my weather station dashboard-
var m = {
"series": ["Rainfall"],
"data":[msg.payload[0] ["sum(RAINFALL)"]],
"labels":["Todays Rainfall"]
};
return {payload:[m]};
Long story short the data is rainfall sum from my database and is in inches. I've been running it this way for 3 years. I wish now to modify it to mm (*25.4) before returning the message to my chart. Could somebody please explain how I can do this inside of this function.
This is how the data appears when returned:
[{"series":["Rainfall"],"data":[0.293],"labels":["Todays Rainfall"]}]
Thanks
Derek