Database: Keep all data for some entities?

Hi,

Is there a way to keep all data for some entities?

I'm trying to train a neural network on my data, but I just realized I don't have a lot since HA rightfully purges data so my db doesn't balloon.

What I'm looking for is a way to keep all data in the database for some entities, but not for all.

Is that possible or am I out of luck? Also happy to use workarounds in case you guys can think of any?

Thanks!

Look into influxDB...
You don't want it in your database messing with the speed of your moment to moment activity and messing with the size of your backups.

Below is some useful links
Recorder - Home Assistant .

How to keep your recorder database size under control .

How to reduce your database size and extend the life of your SD card .

Depending upon your needs , yes HA purge, by default which you can change, BUT also by default HA records probably more than you ever need !

It take time to “know” ones Installation and what’s really worth writing to disk … i.e every d… time you hit a switch, sensors which only have a specific non-essential purpose etc. etc.

I started years ago with configure my Recorder, with “Includes” only , with this i don’t get alot nonsense every time i add a Device, one never know before installing a Device which entities is added … But then one also knows which are essential to add to the DB.
EDIT: Thou this requires you to keep an eye on your logs also :laughing: , vendors have an “ability” to add “features/dependencies ” or what we should call it, which now and then requires one to add an entity or 2, to the DB, to avoid “errors” in the logs, do to “missing” old/statistic/resent datas

So basically, if you can exclude half of what’s Recorded, you can extend overall Purge interval
And there’s alot Topic beside above which have suggestions on howto keep your DB “Tidy”

Thanks, that looks promising!