Sorry for the silly newbie questions.
OK so I am getting milliamps and I want amps displayed on my dashboard.
So I use a function node with this and all works great.
var o = msg.payload
msg.payload = msg.payload / 1000
return msg;
Ok now the issue.
I am also getting in watt hours and I want to display that as kWh on the dashboard.
So the same math should work.
var o = msg.payload
msg.payload = msg.payload / 1000
return msg;
But for some reason it does not work the dashboard still displays watt hours.
I don't understand why the math operation is not working?
Running debug on the mqtt output shows.
5/14/2021, 2:36:04 PM[node: 1eeb439b.969b4c
wallcharger/wh : msg.payload : string[6]
"309794"
Running debug on the function node output shows nothing. This I think is telling me that the dashboard is not updating and it showing cached info and that nothing is flowing thru my function node.
I don't get it.
OK so I did figure this out and I wanted to post in case someone else has the same issue.
I just decided to delete the function node and add it again. Then all of a sudden the debug node had output and popped in the formula and its working.