I am using the sensor below from MQTT data. It does not seem to save history beyond 10 days. I understand there is 10d short-term history and a less granular long-term history. My other devices (temperature sensor, air quality sensor, etc) seem to have the long-term history without additional configuration. Can you explain to me if custom sensors like what I have set up do not automatically have long-term history, and how I can configure it so it keeps the long-term history? Thank you!
Ellcon is correct, adding a valid state_class will cause LTS to be generated. This will be kept forever. You can only add it for the numeric type sensors.
Thanks @Ellcon and @tom_l for your solution. So it sounds like if I wanted to log non-numeric sensors/data, then I would have to log it into an external database?