How to populate HA database with historical data? (JSON, API)

I have an electricity meter that sends data to the base station once a day or other day. Data is accessible via API, and represented by UNIX timestamp and counter reading for tariff1 and tariff2. I can request timestamp for the last uploaded reading and download readings in JSON for particular period using from/to parameters.

I wonder if there is a mechanism in HA to populate sensors values with downloaded historical data using corresponding timestamps?

JSON example for tariff 1: {“status”:“ok”,“channel”:“electro_ac_p_lsum_t1”,“values”:{“1559552400”:“374.7330”}}