Create a sensor from a statistic

Hi everyone,
I have this statistical card that works perfectly:

type: statistics
entity: sensor.c
     period: day
stat_type: change
name: KWh Consumed in energy TODAY

My sensor.c has this configuration:

state_class: total
source: sensor.f20t60a_power
unit_of_measurement: kWh
device_class: energy
friendly_name: c

and this in the sensor.yaml:

   - platform: integration
     source: sensor.f20t60a_power
     name: bticino f20t60a energy
     unit_prefix: k
     rounds: 3
     unit: kWh
     method: left

Now I would like to create a new sensor that does the same thing or that takes the value of this statistic with reference to the period:day only.
I have already tried the utility meter but it cannot take the statistical value of a specific reference period, as the statistical card I put above does.
How can I do?
Thank you all

What version of HA are you using? I cannot find any reference to the way you specify the period for the statistics sensor.

What your statistical sensor seems to do is exactly what utility meter does, at least in current HA versions. It can work directly on the kWh sensor. It is totally unclear what you mean by:

The sensor.c speaks of today, same as utility meter does. But you do need to give it chance to collect data, it does not count anything before the creation of the sensor. So the first day is incomplete. I think it even says so in the documentation.

Thanks for the reply.
I use the version
Core: 2024.4.3
Supervisor: 2024.04.0

The utility meter doesn’t take values that have already passed.

This one does it instead:

using this for example:

type: statistics
entity: sensor.c
     period: day
     offset: -1
stat_type: change
name: KWh Consumed in energy YESTARDAY

I get only yesterday’s value.

Having this sensor.c which is of the incremental type (state_class: total) I would like to obtain the value that is generated via this statistical card and save it.
Maybe with an automation to store this value with service: input_text.set_value
or as a new sensor. How can I do?