Nighttime water consumption for tiny leak detection

I would like to measure my nighttime water consumption between 1 a.m. and 5 a.m. (when i don’t use water) in order to be notified if there has been a night-time consumption on a long period
to detect tiny leaks.
I tried history_stats but it is not suitable for consumption, I am already using utility_meter but I do not see how to use it only for a given period. ditto for the statistics component. an idea?
my counter configuration

 - platform: snmp
    host: !secret snmp_host
    community: public
    baseoid: 1.3.6.1.4.1.21796.4.6.1.3.1.7.1.1005
    name: Compteur Eau Froide
    unit_of_measurement: m³

the statistics

Use tariffs. Have an automation enable / disable a night tariff on a utility meter.