Closed emandtf closed 5 months ago
Unclear. Please provide more detailed description & a short minimal code.
minimal code.
Minimal code of what? It's Homeassistant YAML, not a programming language/software with its code 😅
I have a sensor that stores a temperature every X hours, so if the x-axis represents 24h I'm expecting only 4 "peaks"/bars at regular interval but instead I get N bars starting from the origin (0,0) until first data is reached and all these bars (that have NO ANY data in the database) have the "first data" value. Screenshot previously attached (and its description) is very clear. I'm expecting NO BARS starting from the left until first data is met, and not N fake bars starting from origin which have the same value of the first available data that occurs in the middle of X-axis 😅
t's Homeassistant YAML, not a programming language/software with its code
yaml code.
Also provide a standard history-graph for the same hours_to_show. 1 picture is worth 100 words.
1 picture is worth 100 words.
I've already attached a screenshot at the first post 😅
This is the "code" :
- type: custom:mini-graph-card entities:
- entity: sensor.openwrt_cpu_temperature hours_to_show: 58 show: graph: bar
- type: history-graph entities:
- entity: sensor.openwrt_cpu_temperature hours_to_show: 58
and this is the picture
that is "the same" of before 🤷♂️
Mini-chart starts to show some values starting from origin even if the data are not present in the DB. And these values (before the first valid one) has the same value of that first valid.
This is the "code" :
Although the posted code is clear - it is still unformatted and cannot be used to copy/paste. If you need to be helped - try to cooperate, otherwise you will not get a support, issue will be closed. "Formatted" - check other issues how people format a code.
Edit your code as follows:
bar
with line
.points_per_hour
close to the actual frequency of your readings.Then post the FORMATTED code & screenshot.
Closed as heated.
Let me prepare an example:
As you can see the whole rounded-in-red part is displayed by the Chart but there aren't any data there. The very first and existent record is the first on the right-side of the red-border.
This happens in both "bars" and "lines" mode.