What do you do with the saved csv file?
Can you re-use it in HA ?
As @JKW pointed out, it would be nice to re-use this data back in HA ie. in case you have deleted you database or for restore purposes?
Hey guys, a little feedback from my side: I didn’t really find an existing approach so I’ve done some tinkering myself. Maybe you can comment on those ideas:
Storing Data
As of now I’m using the approach that @VDRainer has posted. that works super easy
Retrieving Data
I’ve create a very simple custom_component that can read an external file and store the content as attribute of a sensor. So that part is taken care of as well, although it is still a bit hacky.
Displaying Data
Thats where I’m currently working on. I’ve grabbed the source of the minigraph card and work on some modifications. The idea is to replace the history data with the data from the custom_component attribute. This isn’t working yet but I guess I’ll get that working with a little tweaking.
Is there anything that I can do smarter? Less hacky? Cleaner?
Thanks, JKW
Maybe rename the mini-graph-card to long-term-card to avoid conflicts when both cards are used or request a PR to the original dev to have your changes included.
Changing the name and the readme etc is something I’ll do next … including the changes in the existing respository is very unlikely due to the amount of the changes … its basically 50% different
Just to show a screenshot … the top shows the actual sensor and the two graphs below are reading from the file … EM total month is just showing the data, Energy Monath / Day uses “diff” as display mode, so showing the difference between two days (so the amount that we’ve used within a day)
I copied the long-term-card-bundle.js file into the local folder (www) and then I added it to the resources, but it doesn’t work, cannot recognize the card