How can I access the integrated/summed value of sensors with state_class=total_increasing?


I’m trying to export my energy, water and heat values from homeassistant into a spreadsheet. So, while I can directly use my energy and heat sensors which are of state_class=total (so their value matches the readings from the meter directly), I cannot do so for my water pulse meter (state_class=total_increasing). Every time it resets, the counter restarts to 0 and therefore the sensor restarts to 0. However, I do know HomeAssistant keeps track of the increasing value as I can literally see it in the statistics database :slight_smile:

So, is there a way to get to the increasing “sum” value of these type of sensors? Something other than crafting a manual SQL query for it?