Since configuring the Victron GX integration (great integration!), my database has been filling up with a huge number of Victron sensors. I don't need long-term statistics (LTS) data for most of them, but I can't change the state_class. Google tells me it's hardcoded, so it indeed reverts to the original state_class after every reboot—rather than, say, null or none. Wouldn't it be better to allow the user to change this, as is the case with so many other sensors, or are there other factors involved?
You need to configure the Recorder integration (and possibly the Activity {formerly Logbook} integration) to filter those out.
There's a great Community Guide by tom_l that walks you through it and can save you a lot of extra work.
Thanks for the link, it really has some good tips. But I want to change a few State_classes so they no longer end up in the LTS. Normally, you put them in the configuration.yaml under customize with the new state_class. However, with the Victron integration, that doesn't work because they are hardcoded.
If that's the case (not something I've ever done) then you should probably file an issue with the integrations owner.