How can I inject values to the database for an entity?

I didn’t set the coronavirus sensor until now and I want to use a particular rest api that allows me to track by state. I want to grab the history of my state and inject it into home assistant to back date and then add the sensor and use a Lovelace card to graph the data.

Is this possible?

same question here.
how to fill historic data from the past of a sensor?