@evb Still haven't had a chance to look at your PR, sorry.
Yes, the database tends to grow I have about 80MB after a year of use. Just added a function to delete all messages older than, say, a year.
@Yveaux do you also use Grafana in order to visualize the data? I am not sure what fields/attributes are necessary despite "time" and "value" for a binary sensor.