Feature request: Render future graph
See original GitHub issueI use this component for almost all my graphs and it’s great. I’ve however identified a feature that would be useful, but perhaps too niche: Render not only past values but also future values.
For instance, I’m on an electric tariff with two time periods and I’ve created this beautiful bar graph with the electric prices:
Price is different every hour. And every day at 8PM the prices for the next day are published. So I know in advance what the graph for the next day will be. And in fact it’s more useful to me to display what the prices will be than what the price was.
I’d like to be able to render a graph that instead of the last 24h, it shows me the last 12h and the future 12h (probably styled slightly different).
For completion, this is the HA sensor I have for the prices:
attribution: Data retrieved from api.esios.ree.es by REE
tariff: discrimination
min_price: 0.01558
min_price_at: 4
next_best_at:
- 4
- 5
- 6
- 3
- 12
- 7
- 8
- 11
- 9
- 2
- 10
- 1
- 23
- 0
- 15
- 14
- 16
- 17
- 13
- 18
- 19
- 22
- 21
- 20
price_00h: 0.0387
price_01h: 0.02893
price_02h: 0.02531
price_03h: 0.01784
price_04h: 0.01558
price_05h: 0.0159
price_06h: 0.01691
price_07h: 0.02029
price_08h: 0.02084
price_09h: 0.02514
price_10h: 0.02602
price_11h: 0.02148
price_12h: 0.01954
price_13h: 0.08203
price_14h: 0.07873
price_15h: 0.07639
price_16h: 0.08001
price_17h: 0.08043
price_18h: 0.08714
price_19h: 0.09637
price_20h: 0.11291
price_21h: 0.1089
price_22h: 0.10805
price_23h: 0.03844
unit_of_measurement: €/kWh
friendly_name: Precio Electricidad
icon: 'mdi:currency-eur'
Is there any feature that allows this already?
I considered that I could create some sort of virtual sensor in HA but that displays the value 4h in the future, and make the graph card track that sensor instead, but I don’t know how would I display the current price in the top-left corner if I did that, or how I’d display the past hours and the future hours with different colors (perhaps with a slight transparency)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top GitHub Comments
I completely agree and this would be HUGE feature for minimal effort.
Another additional feature would be to set a fixed time window (e.g. ‘today’, which is a fixed 24 hour window), so that the axis is fixed and data is plotted from left to right as time progresses, rather than showing a fixed length of time in the past. This would then be able to show future data (if it exists). It would also be great to be able to create daily power generation graphs such as this:
@thejonesyboy @cibernox, I’ve published a new card to display graphs and it supports to generate data out of attributes in a generic way and display the future also 🔮 I’ve tested with the PVPC integration and it works amazingly well 😃
==> Card: https://github.com/RomRider/apexcharts-card ==> Feature request: https://github.com/RomRider/apexcharts-card/issues/6 where you’ll also find links to the PR with some explanation!