WTH is there no way to add historical data to Energy Dashboard

Homeassistant wasn’t my first love (but will probably be my last). In previous life I have been recording my energy consumption in Emoncms. I was hoping that some bright light by now would have managed to create a script allowing to import historical data into Homeassistant, but either I am the only person looking for this or it is too hard to do.

Would be awesome if this gets added to Homeassistant!

Its a duplicate of my feature request here: Add historic data to Energy dashboard

Please vote for that instead.

2 Likes

been lots of attempts and scripts around to get external or other history data into energy dash. A generic ’ convert data to energy aggregate’ would maybe a difficult one and resource intensive for larger data sets. Still would love to see some helper stuff if not fully automated.

I have to manually read the meters in my flat, there are 4 for water, 1 for electric and 7 for heatings, as the flat is rented I am not able to have those values automatically inside HA, so i need to input them manually and cannot do this always immediately after reading. So I’d welcome also a way to (manually) input historic data to HA to keep track of my consumption. Maybe it could be done by an own integration which has more features like statistics and so, but at least the ability to input values for a specific date would be a good step.

I’d like to add this would be great for any state, not specifically energy. As others have mentioned elsewhere, water readings would be a good example.

Simply being able to say "at <x timestamp>, state was <y>" and recording that into the history as if it was recorded at that time like a typical sensor’s state, would be fantastic.

I can see this being tricky given how in the database, it appears any state update has a timestamp and reference to the previous update(by its id). Inserting one at an arbitrary time point would require finding the previous, and potentially, next state update on the time scale, and updating the references in there; not just inserting one database record. That’s not to mention dealing with any derived sensors, statistics…

I guess I can see why this isn’t a feature (yet?)… :slight_smile:

5 Likes

+1 for this. Would be great to be able to add the CSVs i can download from octopus energy dashboard for historical data

1 Like

It should be more usable if the history loader could be more generic. I would be more happy, if the historic loader could produce a sample csv template (based on the data sequence (what the integration collects and logs)) or even a csv dump of the current data set.
Then it would be easy to convert the existing data set matching to the example csv format, then load it (ie: a kind of journal replay of the missed collections)

3 Likes

Take a look at Frenck’s new integration.

1 Like

… yes there’s a tantalising reference to importing data, but no info about how.

Install I tegrations and try to make a service call from the developer tools

Did anyone already dare to use this option?

Frenck is one of the developers of HA.
I have not yet tried to insert historic data, but O have used other service calls, like remove all orphaned devices.

I just tried it but it do not work or I’m to stu… to get this to work :sweat_smile:

Is there some guide how to do it?

@picassoruiz, @jgclark, @boti, @Tommy8884, @MichD
I created a script that can import historical data for the Dutch energy provider Eneco with their Toon thermostat.
The script should be easily adaptable for other providers that use a different export format. The processing logic to change the statistics stays the same.

2 Likes

Despite this being an old WTH topic I sure hope some developer can pick it up as this is still very much a wanted feature.

3 Likes

I just created an integration to import historical data from csv/tsv-files via a service. Maybe this can help one or the other, see this post.

Feedback welcome!