New sensor : set_state in the past

Hello
Is it possible to set_state with specific timestamps sothat the values are considered in the past ?

In details :slight_smile:
I’ve sensors that are collecting house power consumption since many months.
I would like to compute the price with specific tarifs in a new sensor (with the energy sensor), and set daily values in the past.
Is it possible ? Or does set_state or other methods apply only on current time ?