Turns out HomeAssistant only returns 10 days'data byault. This is a problem that we will havsoon.
Now the cache doesn't reset eh time it only if some data is missing.
This is the first, most basic implementation of a SQLite database for caching.
Future commits will make it much more optimized and able to efficiently store data for periods longer than 8 days.