How to get largest use period from water sensor?

Can someone please suggest a way to display the largest water use times and volumes for a day?
I have a sensor that increments for each liter used. I use it to increment the utility sensors for hour, day etc. But I want to know not the largest use hour (that I have already) but also when the largest use started, ended and how much water was used

Maybe create a trend sensor?

Otherwise readout the water usage each day at 0:00 and use that vale to calculate the daily usage.
Create a helper (input_number) and use that in your automation and sensor:

alias: New Automation
description: ''
mode: single
  - platform: time
    at: '00:00:00'
condition: []
  - service: input_number.set_value
        entity_id: input_number.daily_water
        value: "{{ states.sensor.waterusage.state (or whatever yours is called) }}"

And in the template sensor you just subtract this helper from your water usage sensor and you get the daily usage.

Daily, monthly etc I get using the utility sensor, which resets every night etc
I want to get a list of major water use periods, similar to this:
Start time: 11:35am
End time: 12:05 pm
Water used: 365L

I am currently using hourly values. But I cannot track if 2 or more events happened in the same hour. Like if I wanted to know how much water kids used while taking a bath. It’s fine if it happened in an hour when no other water was used. But if they turned on water quarter to and turned off 20 past, I would not know how much was really used between the 2 points

Did you ever find a solution? Keen to use something similar. I just would like to have the maximum during a day and reset for the next day. I have a flow sensor and a total sensor, so it should be possible to deduct this.

Example from this morning, 3 showers, but who used the most water?