Insert custom data into Home Assistant Database

Hello,

I am moving from a mix of SmartThings+Pi system to Home Assistant. I have set up a recorder with Postgres at the moment.

In my old system I have captured some data from various sensors for over a year and wanted to migrate the data too. I already moved those sensors to HA and they are working fine.

I am going to use Grafana to visualise the data going forward and would like to have all the data in HA DB if possible.

Since the states table has a foreign key to event_id’s, I guess I need to reference some event IDs when inserting the data.

  1. Is event_id necessary? Is there a default eventID I can reference just to insert all of those historical states?

  2. What’s the difference between last_changed, last updated and created fields?

  3. Any other constraints I should worry about?

Thank you heaps in advance!

Here (History - Home Assistant) exists information about fields.