TREND sensor.. How to? Must be stupid!

Don’t understand how the TREND sensor works or how to calculate it.
Today have a temperature sensor that sends a value every 60sec.

If I want to know if the temperature is rising or falling, how should I calculate?
Say I want in a time span of 15 min want to know if the temperature has risen or fallen by at least 0.5 degrees?

It would be great if someone could help me set up a helper so that I can get an indication of whether the temperature is rising or falling.

15 minutes = 900 seconds

-0.5 / 900 = -0.000555 °/s

(negative temp for falling).

Just add this value to the example shown in the docs. Trend - Home Assistant

1 Like

Allright!

And the values for :

You have not set the rate to minus, for falling temperature.

If your sensor sends a value every 60 seconds you need this many samples in fifteen minutes:

minutes * 60 / sample rate in sec:
15 * 60 / 60 = 15 samples maximum.

As for the minimum, you want at least enough to get a good average, try 5.

Duration is 900 seconds as per my last post.

So from top to bottom:

15
5
-0.000555
900
1 Like

Big thanks for the info…
Think I know how this works now…