Preserve the history of certain sensors for a longer period of time

Have you checked the database to see if the data is there?

As I understand, in the db there is a states tabel that is purged perriodically, and a statistics table that holds the LTS data.

Check the latter one to see if the data is there. The statistics_meta table gives you the ids of the sensors that you can use to filter the data.

No, the data is not there in LTS. The question is, why? It’s a sensor set up for LTS.