kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.96k stars 232 forks source link

Feature Request - add ability to capture future / forecasted data to graph (OpenWeathermap forecast data) #929

Closed DeFlanko closed 7 months ago

DeFlanko commented 1 year ago

With the hours_to_show being historical time, please find a way to add in hours_to_show_future for future data predictions.

In my example, OpenWeatherMap uses future predications for ran precipitation forecasting, it would be nice to see that in a line graph on the upcoming 7 or 10 days

ildar170975 commented 1 year ago

The card uses DB to get data. This is the only source. The card will not predict data.

If some integration like OpenWeatherMap creates sensors containing data describing a “future” (like “a set of values for tomorrow”, “a set of values for a day after tomorrow”, …) - then you can create template sensors to keep these forecast data and build your graphs. Probably you do not want to deal with these template sensors and want the card to extract data from sensors which have differently structured data (for instance, forecast is stored differently in different weather integrations), not to mention a fact that forecast may be stored for days, not hours - then what “hours_to_show_future” do you mean…

In short: if you propose something - then please provide an algorithm which will be universal for different cases.

ildar170975 commented 7 months ago

This mainly about accessing complex attributes. Implemented in https://github.com/kalkih/mini-graph-card/pull/996. Closing