Different history retention per entity in Home Assistant recorder?

Hi all,

I’m trying to configure Home Assistant so that only two sensors keep long-term history (about 1 year), while all other entities keep the default / shorter retention.

Specifically:

  • sensor.temperature
  • sensor.humidity

From what I understand, the recorder integration only supports a global purge_keep_days value and does not allow different retention periods per entity.

Is there any way to keep 1 year of history for specific entities only

Thanks in advance!

No there isn’t. But long term statistics is something entirely separate from recorder history, and those are kept forever.

Does using the existing long term statistics work for your usecase?

Maybe, I like seeing the temperature over time. How do I apply that?

How about a statistics graph card?