#Energy dashboard data in home-assistant_v2.db

1 messages · Page 1 of 1 (latest)

sly charm
#

Hey,

I've backup file from last year where I should find the energy production data from my last summer.
I have a different HA instance where I wish to insert that data.
For that I have to find the specific data in the home-assistant_v2.db file and I need to insert it into my current home assistant.
But I have no idea in which table this data is stored.

Could anybody help me here?

T

orchid pivot
#

energy data is just statistics data

sly charm
#

Yeah but I have no idea how to read that data. There is only:

#

Nothing helps to identify the amount here:

#

of each day

orchid pivot
#

those values are not stored in the database, but computed from statistics

#

so if you have a sensor for your solar production, that sensor has generated statistics based on its entity name

#

the value in that bubble in the card comes from the sum of that statistics

#

If you have sensor for grid input/output, and solar, it's those sensor data you want to retain

sly charm
#

Okay, but how can I find the data of .e.g these two entities:

#

Ah metadata_id

orchid pivot
#

yeah metadata_id

sly charm
#

But where I get the date of the measurement?

orchid pivot
#

statistics table has created_ts and start_ts

sly charm
#

Okay.
So I have to update the metadata_id to the id of that sensor in the new system.
Then I have to store it in a file and load it to my HA instance?

orchid pivot
#

I can't walk you through the exact steps, I haven't done it and it's not something advertised as supported.

sly charm
#

okay. But it sounds correct

orchid pivot
#

I'm sure it's possible but it's probably not easy.

sly charm
#

So I'll give it a try

#

Is there data in other tables, which needs to be present too if I copy the statics stuff?

#

e.g. in statistics_runs ?

orchid pivot
#

I'm not confident I know what the point of that table is 🤷

sly charm
#

Nice it worked, thank you!