# Sensor that provides data retroactively

I have developed a Sensor platform that is an online residential Water Meter Reader. It simply brings the current water meter value from the water provider’s website.
The minimum resolution for the meter is 0.1 cube-meters, which is 100 liters.
Here is the sensor’s graph:

As you can see, the graph looks like steps. Every time my house consumes 100 liters, the sensor value increases by 100 liters, and a new step starts.

I wish to show is a liters-per-minute graph. I think that it means creating an additional Sensor with (estimated) consumption rate, as accurately as possible, based on the limited available data.

The green graph below shows what I wish to show. A graph where the height is the estimated consumption for that time period. It is calculated by dividing the “100 liters” by the duration of time it was consumed. The shorter the duration for consuming 100 liters, the higher the consumption value.

Unfortunately Home Assistant expects a momentary consumption sensor to provide its value right from the beginning of the time period. But we know the consumption duration only when the time period ends.

Is there a way to solve this problem to generate a graph like the green one? Can there be a sensor that provides past values?