I’m trying to achieve something similar based on a weather entity. What I would like to display:
Temperature history
Temperature forecast high
Temperature forecast low
The graph spans 14 days (7 in the past, 7 in the future), and the idea would be to set temp forecast high to noon and temp forecast low to midnight, as well as join the temperature history (currently grouped by 2h average) via the data generator.
At the moment, I have the following for temp forecast high:
I would like to show the sum of the two as well (since that is, in the end, what I’m going to have to pay in total). Is there a way to add the energy price (“kraftpris”) and grid tariff (“nettleie”) directly in the chart, or should I rather set up another sensor for the sum?
please , can somebody explain me, how can I setup bar chart with day energy consumption?
From entity I can get total consumption and I think, i must use transform to compute consumption difference for every day.
They do work. Did you enable the experimental feature?
You need to edit the legend part also.
For 1. use card-mod
For 2. datalabels are to be set in show for each series.
Not possible for 1 entity unfortunately, that’s a limitation of the library I use.
You can use as_duration from the documentation. But if I remember correctly, it doesn’t apply to the datalabels (that is something I can add)
You should be able to use EVAL for that (check the documentation). I don’t remember if the hass object is available though… I’d need to check further.
You can use card-mod for that
No trick unfortunately, that’s how the library works
Please open a GH issue if you didn’t fix it
I’m not sure I understand what the issue is. Not that if there are gaps in the values (ie. some values are null, then color_threshold doesn’t work well.)
try this:
return entity.attributes.forecast.flatMap((entry) => {
let noon = new Date(entry.datetime).setHours(12, 0, 0, 0);
let midnight = new Date(entry.datetime).setHours(23, 59, 59, 99);
return [[new Date(noon).getTime(), entry.temperature], [new Date(midnight).getTime(), entry.templow]];
});
Can you please share your code for this one. It seems the example on the Github page for the HNT component. doesn’t work anymore as y_axis_precision: is depreciated. Thanks.
When I have more than one y-axis, the min value is allways set to 0. Therefore I experiment calculating that value by my own. my example sets the min to next 1.000 below and the max to the next 1.000 above the real values.
What I would like to to is something like set the tickAmount to the number of 1.000 between min and max.
I was afraid of that! I’ll poke around with the regular graph options, see if I can avoid the overlap between forecast and history that I’m currently having.
I have an Oven Entity I’m trying to graph where there are several attributes. Basically I want the “set” temp ‘temperature’ and current temp ‘current_temperature’ graphed over the past 4 hours. I can’t find a way to add 2 attributes to a graph… one works fine.
Hi! I tried searching for it, but I can’t find the right stacked type setup for what I want.
I’m trying to replicate something like this, to get a view per hour what device consumed most energy:
I was wondering if anyone has figured out how to do custom annotations? I would like to create a graph like this one where wind direction is plotted as an annotation on top of wind speed:
Based on this example, something like that should be possible in the base library, but I’m not sure it’s possible to do programmatic annotations like that through the card. Anyone have any tricks or is this just feature request #209?
Finally, I got it working!
Thanks @RomRider for an excellent card with great usability
This is what I got so far, total energy consumed on yellow line, breakdown on device level in stacked barchart.