Best way to show long term data?
See original GitHub issueI’ve noticed that HomeAssistant gets unresponsive if showing history data for about two weeks using the default sqlite database.
Is it possible to do some throttling when asking for the history data?
I have 4 mini-graph-cards showing history like this:
- entities:
- entity: sensor.floor_2_kwh_verlichting_total
name: VERLICHTING
font_size: 75
hours_to_show: 336
icon: 'mdi:flash'
line_width: 8
points_per_hour: 0.041667
type: 'custom:mini-graph-card'
But the result is that my homeassistant gets unresponsive and goes to 100% CPU due to the history api calls.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
13 Powerful Methods for Data Visualization Success l Sisense
1. Indicators show one KPI, clearly · 2. Line charts display trends · 3. Bar charts break things down, simply · 4. Column...
Read more >Showing Data Over Time - The Data Visualisation Catalogue
Showing Data Over Time · Area Graph · Bubble Chart · Candlestick Chart · Gantt Chart · Heatmap · Histogram · Line Graph...
Read more >How to Choose the Right Data Visualization | Tutorial by Chartio
There are many ways that charts can be used to visualize data. Read this article to learn which charts can be used for...
Read more >11 Ways to Visualize Changes Over Time – A Guide
Let's start with the basics: the line graph. · Scatterplots work well if you have a lot of data points. · Bar charts...
Read more >Visualizations That Really Work - Harvard Business Review
In some ways, “data visualization” is a terrible term. It seems to reduce the construction of good charts to a mechanical procedure. It...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can think of 2 solutions:
Instead of updating the history on every state update, you could update it on a time interval if the state is changed, this could be a setting.
And on updating only get the new data instead of all data, store the last fetch timestamp and use that as start for the history api, then concat the new data with the old.
I could look into it in the next weeks or so if you think it is a good idea.
Fetching of history is now much more efficient thanks to #88 There’s also a new option
update_interval
to set the interval between history requests, but with the changes in #88 I don’t really think it should be needed, unless your system is really struggling.