Wrong time of state - is there a way to move it to the past?

I have a power meter that reads the kwh value at 23:59:59 but sends it to HA few hours later. There is absolutely no way for me to change that (not my device). Because of that my Energy tab is not synced properly - there is always 1 day delay - HA “thinks” that the power usage was on the day that it got the value and not the day before.
Is there a way to move the sensor value to 23:59:59 on the day before, after is was updated or create a custom sensor template which will set the updated value at yesterday’s timestamp?