-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download energy panel data to CSV #19863
Conversation
I think that you've optimized for the wrong consumer. Your CSV is great to read by a human in Excel. However, it will be a pain to consume programmatically. Since we have the UI for humans, we should keep CVS focused on program consumption. I suggest to follow the same format as the history panel (which will also be better for re-using code to parse the data). We can add an extra column to indicate where the source is used (grid_consumption, device_consumption etc) |
Hmm, I did like that this dumped out in such a way that it maintained the relationship between the different entities at the same timestamp, I thought that was a nice differentiation of energy vs what history provides. If we were just going to flatten it to a single list of datapoints and lose the visual time correllation across different types, do you think there much value added by having this feature here in energy panel, if it's just providing the same thing that the history panel already provides? I thought it was nice that it provide things in a different way for different usecases. The uses I had somewhat in mind were:
Hadn't really considered any use cases involving machine reading the data. Anyway that's just my thoughts about it. |
It's not just machine learning. Analyzing any data would involve a machine reading the data. If you want to make a generic Excel spreadsheet or a website that reads this data to do things with it, it now needs custom logic to learn how we group things. |
I think we can keep the same data but move the "headers" (grid consumption, solar production, etc) to a column, so it will be readable by a computer. Also add a header row to indicate what data the column has. |
I would be happy with this as well, though this still sounds a bit different than what Paulus is looking for, would have to hear if he is happy with it. |
This one is not that bad 👍 Question: how many columns do we have when we look at a year worth of data, 365? Question 2: if we are comparing data, should we include that data too? (and then have 730 columns?) |
btw why is the 2nd column empty ? |
No, only 12 (it's monthly aggregated in that case). Energy panel does not allow user to choose data resolution, so any time range over 35 days shows monthly-aggregated statistics.
Possibly, I didn't choose to implement that yet, I'm not sure what would be the best way to organize that data for comparison.
I don't see that, do you mean 2nd row? If so it's because the timestamp consumes 2 cells (one for start and one for end), so the header required two rows. |
Sorry, I did mean row indeed. We cannot make up CSV formats and repurpose the 2nd row. The first row is header, the rest should be data. I would suggest we drop the 2nd row and keep only the start timestamp in the first row. |
Updated from feedback (removed end times, separate type column, removed translations). Two potential open questions:
|
Yeah let's differentiate the type by adding |
Agree on the compare data. Let's leave it out for now. |
Added types: grid_consumption_cost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed change
Inspired by history panel download, I think that could be a useful feature for energy panel as well.
This just returns the statistics, it doesn't return any derivitive calculations (consumed solar, self sufficiency, etc), but those might be a nice addition in the future.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: