Maybe you could create SQL sensors from the info here: How to reduce your database size and extend the life of your SD card
Particularly: