I try to explain ....
In my dashboard I show the current temperature and the lowest temperature of the day.
This morning the current temperature was 0 and I set the var tempEsternaMinPrec to 0 because it was the lowest temperature of the day.
When the temperature is increased to 0.1 the var tempEsternaMinPrec had to remain to 0 but the second function is failed because the value temp is set to 30 and not 0.
if I delete the default value (30) then the function works fine ....
Where is the problem?
first node
flow.set("tempEsternaMinPrec", 0);
second node
const output = [null];
const temp = flow.get("tempEsternaMinPrec") || 30
node.status(temp)
const x = 0.1
if (x < temp) {
output[0] = { payload: x }
}
return output;