As mentioned in the retex
It is surprising how quickly the database fills up.
In this retex, I will try to identify the entities that register the most, check if their registration is useful and configure HA recorder to limit the size of the base.
I identify the entities with the most registrations
I'm going to connect to the SSH command line and I'm going to query the database
cd ~/config
sqlite3 home-assistant_v2.db .header on .mode column .width 50, 10, SELECT states_meta.entity_id, COUNT(*) AS count FROM states JOIN states_meta ON states.metadata_id = states_meta.metadata _id GROUP BY states_meta.entity _id ORDER BY count DESC LIMIT 20;

This command displays the 20 entities with the most records (therefore the most database size consuming entities).
By changing LIMIT 20 to LIMIT 200 I have the 200 entities with the most registrations
I configure recorder
I created a file recorder.yaml without forgetting to specify it in configuration.yaml
This file allows you to include or exclude everything I want to save (or not)
Being constantly evolving, I do not put here a copy of the code, but the file can be consulted on the GitHub.
By selecting what I want to save, I can control the size of the database.

