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]];
});
Use a sensor instead