If you are looking for an efficient and easy to use way for long term storage of your Home Assistant data - just use VictoriaMetrics. I am still impressed how efficient this database stores all my sensor values an the database size stays so tiny compared to InfluxDB an others.
Grafana and VictoriaMetrics are a dream team. I was using InfluxDB for some years and now switched to VictoriaMetrics. I tried Influx2 but it was not my friend and was no fun in combination with Grafana. I don’t want to write database queries when creating a simple visualization in Grafana. So the search for alternatives began and VictoriaMetrics is the way to go.
VictoriaMetrics Time Series Database is 100% compatible with the Prometheus and InfluxDB line protocol. So Homeassistant is able to connect to VictoriaMetrics with the InfluxDB. In Grafana you can use the Prometheus or InfluxDB data source.
VictoriaMetrics offers an ultra efficient compression for data storage, is highly optimized for time series data and has low RAM usage. So this is the perfect solution for long term storage of high amounts of data like all sensor values of your smart home.
Because i am using Home Assistant OS (Hass.io) on a RaspberryPi 4 and wanted to run Victoria Metrics on the same system i created VictoriaMetrics as Add-on for Home Assistant.
I hope you enjoy this Add-on and it will make long-term data storage and visualization of your Home Assistant data a lot easier. The Add-on including documentation is available at GitHub.