bar chart shows wrong values
I am using mini-graph-card with bars to show the energy usage in kwh for the last 31 days. I am running the counter for around 24 hours now and the problem is that for the days before the 24h period the bar chart shows 0.02kwh as daily consumption instead of zero. Here is the config of the card and a screenshot:
type: custom:mini-graph-card
entities:
- sensor.itd_meter_1_total_energy_daily
name: Дневна консумация
show:
graph: bar
extrema: false
average: false
labels: false
hour24: true
hours_to_show: 744
group_by: date

:thinking: Could you try with smoothing: false?
Btw, should the smoothing option be disabled in case of bars?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!
Hi!
I think, I have a similar issue with v0.11.0: Sometimes (not figured out when) the card shows instead of 0 the value of the last bar:

The value (state) is only updated on bars that are non-zero. For bars that should be zero the value of the last bar is shown.
type: custom:mini-graph-card
entities:
- entity: sensor.wasser_stundlich
color: blue
group_by: hour
lower_bound: 0
points_per_hour: 1
hour24: true
hours_to_show: 48
aggregate_func: max
smoothing: false
show:
graph: bar
Still an active issue, got it! Removing stale label.
I have the same issue for my raining history. smoothing: false does not change anything.
I have two workarounds for this problem:
- Using
lower_bound: 0.2(works for me, because the min rain detection is 0.2 in my case) - Make such values dark (depending on the theme):
color_thresholds:
- value: 0
color: dark-grey
- value: 0.1
color: blue

I had this issue too. I've just tried setting the aggregate_func to max. I was trying to measure the amount of power generated from my solar panels, and this worked for me. It feels like this should maybe be the default?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!