Summing values from a sensor using historical values

I am tracking amount of formula milk being drunk by my daughter using an MQTT sensor and an MQTT app on my phone.

I have found the history_stats sensor platform, but this does not have a SUM option.

How can I sum up all values in this sensor for the current date and display them?