Ultimate data 24 for automation

Good morning,

I have mounted a computer with the integration of openhardware and it measures things like disk space, temperatures, etc …
I would like every day to send me an email with the values ​​of the day (maximum temperature reached, disk space used, etc.) I have been able to do it, what happens is that it sends me the maximum temperature of your history, not the the last 24 hours
I tried to add this lines


recorder:
  purge_keep_days: 1
  purge_interval: 1

For each day to delete it and there is only one day’s information in the database but there is no way, it does not delete anything.
The automation I have is this, I don’t know if you can put it to use the data of the last 24 hours …


- id: '1578378963461'
  alias: Resumen Diario
  description: ''
  trigger:
  - at: '23:59'
    platform: time
  condition: []
  action:
  - data:
      message: "SRVH01  Temperatura Maxima: {{state_attr('sensor.srvhv01_intel_xeon_e5_2420_0_temperatures_cpu_package',\n\
        \ 'maximum_value')}} ºC"
      title: '{{ now().strftime(''%d %B %Y %H:%M %A'') }} Resumen estado diario'
    service: notify.home_assistant

Thanks for your help!

The recorder purge interval timer resets every time you restart. So if you have been restarting every day it will not have had a chance to purge yet.

You could use the statistics sensor. It has a maximum attribute. Set the max_age to a day and ensure the number of samples (sampling_size) is sufficient for a day’s worth of samples: