Sensor entity: How to parametrize last_reset

Hi, I am writing a template for a sensor entity and I have a value that is a total that is changing up and down during the day but is reset every day at 0:00

If I define the device_class as total_increasing I have some false resets during the day, so I am trying to define a device_class total + last_reset parameter

I need to change last_reset parameter every midnight, what have I to write after


to read a system date without the time part


It seems that last reset is no more allowed for state_class total
I am confused