Long term statistics. MQTT sensors only 10 days


I have tried to put some stuff in config but it dont work. I have only history statistic for 10 days. How to solve? Thanks.

  1. What make you think you only have 10 days of long-term statistics
  2. Show the definition of the sensor

Hello AndersNilsson19,

The sensor has to be a number, it has to have a state_class defined and it has to have a unit of measurement defined to be added to LTS (stored longer than 10 days)

So i must insert “unit_of_measurement: °C” in config yaml ? Is that the problem why it not on LTS?