How to add a historic event?

I have a py script that requests a meter reading from a utility website, but it is always 3 days late. So if I make the request on Jan 5, the most current reading I can get is Jan 2.

If I use command line sensor to do this, it will save the reading of Jan 2, on Jan 5 which is out by 3 days and messes with the graphs (I like to compare the different utility readings).

How can I get the meter readings in at the correct dates so that its logged at the right time?

There’s no way to populate historical data.

You perhaps could by injecting the data direct into the database.

Yea, that’s what I was thinking would be possible. Any idea how?