Temperature for the last 8 hours

sensor.outdoor_temeprature entity measures the current outdoor temperature.
can you please advise me how to get the lowest measured temperature for the last 8 hours of measurement from the sensor.outdoor_temeprature measurement history?

Thank you

Have you tried to use a helper?

Specifically, the “Derivative Sensor” can be set to run for a “time Window”, in your case 8 hours.

So the setup would be
Settings → Helpers → + CREATE HELPER

Give it a name (MyAverageTemperature).
select your input sensor (MagSensor1 device_temperature),
set the precision of the calculation, that is rounding,
set the time interval, i.e., moving average (9h),
Select the time units (minutes),
and hit submit.

This will create an entity named sensor.myaveragetemperature

Let me know if this helps.

By the way, you can “nest” helpers. I have a helper that generates the average of all the temperature sensors in the house. I can use that sensor in a derivative sensor to track for the 9 hours.

Note that your “average” is going to be 0 (zero) until the time window is “filled”, i.e. whatever time frame you set has passed.

Hmm, that can’t be a derivative. the derivative expresses the rate of temperature change. I don’t want that. I want it to take the lowest temperature in 8 hours.
example:

8:00 → 12 degrees
8:05 → 10 degrees
8:10 → 8 degrees
8:15 → 5 degrees
8:20 → 4 degrees
8:25 → 3 degrees
8:30 → 7 degrees
8:35 → 5 degrees

and I want it to pull that value with the time 8:25 → 3 degrees

sensor:
  - platform: statistics
    name: "Outdoor Minimum Temperature"
    entity_id: sensor.outdoor_temeprature
    state_characteristic: value_min
    max_age:
      hours: 8

# if you want the time the minimum occured as well:

  - platform: statistics
    name: "Outdoor Minimum Temperature Time"
    entity_id: sensor.outdoor_temeprature
    state_characteristic: datetime_value_min
    max_age:
      hours: 8

Got it. I was quite off the target then.

Thanks a lot it works fine. When I wanted to write it after CHAT-GPT 3.5, it wrote complete non-functional crap.

Yes it has been over hyped. That’s why we don’t allow it on the forum as answers for other people’s questions.