"Garbage Collection" on MySQL persistence: deleting old Item states

What I used the garbage collection for is to get rid of entries I don’t want to be persisted for a chart and I didn’t want to let my MySQL database piling up entries I’d never use again.
Your use case is more the “I have to persist it” - so how many times do the station get switched on a player and how many players do you have? I think, the amount of “garbage” would be neglectable in comparison to my original intent to just delete entries of items I use for hands-on automation, but are useless after some time, like the current state of my washing machine or the movement in front of my doors…

So my advice:

  • either “just live with it”, because it’s really not much data consumed by it (and perhaps set the garbage timer to a month or so?)
  • or just write a short SQL in parallel, which will delete all, but the newest two entries of your specific player tables and put them this in a procedure