Probably easier to show the example I want to use. I just installed the “Nordpool” HACS integration (shows electricity prices).
Since these are known for one day in advance, these are listed in the attributes, so the sensor has (among others) the attributes:
today: 1.423, 1.358, 1.345, 1.355, 1.366, 1.366, 1.363, 1.368, 1.429, 1.451, 1.479, 1.474, 1.476, 1.451, 1.452, 1.477, 1.497, 1.766, 1.587, 1.302, 0.977, 0.975, 0.974, 0.837
tomorrow: 0.791, 0.785, 0.746, 0.516, 0.458, 0.471, 0.691, 0.785, 0.904, 1.115, 1.255, 1.356, 1.461, 1.438, 1.44, 1.472, 1.733, 2.076, 2.261, 1.949, 1.442, 1.482, 1.378, 1.346
Where the today
and tomorrow
attributes show a list of the prices hour for hour. And these are what I’d like to have in a graph.
Well, actually, I’d probably create a new sensor so it has a list of the next 24 hours as an attribute, regardless of when you look at it, but the principle. I’d like a graph that shows the time/hour on the X-axis (but the time is of course not linked to Hass clock, just related to the position in the list in the attribute) and the price from the list of attributes on the Y-axis.
Does anyone know how to do this?