Trend on temperature like on pressure?

@corrineb: may I suggest to put a trend indication on temperature too like on pressure?



Such as what I did here…

1 Like

Thanks for the suggestion. We will keep this idea in mind when considering application features.


@GaryFunk Out of interest, what cut offs do you use to define if the temperature is falling, rising, or steady?

	diff = (tempNow - temp60MinutesAgo);
	a = Math.abs(diff);
	trend = (diff >=5) ? 'Rising' : (diff <= -5) ? 'Falling' : 'Steady';
	if (a >= 10) {
		trend = 'Rapid ' + trend;
	trend += s;
	return { 
		trend: trend,
		value: diff

I use 5 and 10 degrees in C

isn’t 5 degree yet a lot of difference in 1 hour??

That’s what constitutes a trend.

temperatures can shift in minute(s) if your sensor is responsive most enthusiasts like to use smaller periods so the difference is reflected when it happens . i would not want to wait an hour to see a temperature trend .most common request i get is 15 minute trend in refernce to temperature numerous others want 5 minute trends one hour is on the high side for temperature based changes. but each to their own…

note if your sensor is responsive to small changes … mine is SHT31 but not as responsive as my old SHT11 for whatever reason…

This make much more sense IMHO than 5 and 10 degree in a hour. But it’s just my opinion.

The key word here is trend. A trend is over a longer period of time.

I spent weeks looking at data to determine my formula and you are free to decide for yourself.

i recall large shifts of temperature drop in 15 minutes last winter of 4-5c when winds shift to the north

I could see where it would be OK for 5, 10, 30 and 60 minute trends… Around here, we have storms that cause the temp to drop 10+ degrees in a matter of a minute… (old sailors saying… If the Temp drops the same amount the Wind increases… Get off the water!).

But… then a typical temp variation usually falls in line with @GaryFunk’s way of doing it. I usually see a mean temp of about 90, with fluctuations of about 3-4 degrees either way, within a couple of minutes… but the overall temp is 90…

My 2 cents…


as i said each to there own. not saying anything is wrong

1 Like

i recall now january 2017 we saw 12c drop to zero in thirty minutes spent the next three days watching the snow pile up aprox accumulation at sea leavel was 75cm that was pretty epic for us…

1 Like

One thing about living in Colorado is temperature swings. Temperature can change 80° in a less than two hours. Temperatures can fluctuate rapidly many times on a two hour period and end with a net gain/loss of zero.

I may not know much about weather but I do know data and how to read it. @Weather34 That I am a military trained data analyst and was stationed at Sinop in the 70’s should be a hint.

Plus you’re never wrong

Need also to understand if code showed is for °F or °C. There’s a little difference…

I will defer to @WFstaff as he knows more than we amateurs. I will also state that it may need as much as 90 minutes for more accuracy.

And unlike pressure, temperature is much more localized.

I think also @weather-display (Brian Hamilton) can share his 5 cents :smiley:

I stated C in my original post.

1 Like