mini-graph-card: If a point with a zero value is selected - then a wrong state is displayed
My weather station measures the amount of rain with a rain counter, which sums up the continuous amount of rain. For showing the daily rain, I’ve configured the following card:
type: custom:mini-graph-card
name: Daily Rain
entities:
- entity: sensor.weather_station_rain_counter
show:
graph: bar
hours_to_show: 168
aggregate_func: delta
group_by: date
hour24: true
line_color: '#15317E'
labels: true
The result seems correct:
27.4 mm is the total amount so far.
When hovering over the particular days, the card shows the correct value unless on that day there was no rain. Than it shows the total amount. However, IMHO it should show “0”:

Is my configuration wrong, or is it a card issue?
Thanks!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 32
Commits related to this issue
- fix: allow zero tooltip fixes #805 — committed to akloeckner/mini-graph-card by akloeckner 2 years ago
- fix: allow zero tooltip fixes #805 — committed to kalkih/mini-graph-card by akloeckner 2 years ago
- chore(release): 0.12.0-dev.1 [skip ci] # [0.12.0-dev.1](https://github.com/kalkih/mini-graph-card/compare/v0.11.0...v0.12.0-dev.1) (2023-04-22) ### Bug Fixes * add first datapoint tooltip for line ... — committed to kalkih/mini-graph-card by semantic-release-bot a year ago
- chore(release): 0.12.0 [skip ci] # [0.12.0](https://github.com/kalkih/mini-graph-card/compare/v0.11.0...v0.12.0) (2024-01-27) ### Bug Fixes * add first datapoint tooltip for line graph ([#882](http... — committed to kalkih/mini-graph-card by semantic-release-bot 5 months ago
#880 should fix this issue. But we haven’t merged it yet.
I just gave it a try on the dev branch… Great magic. But it has worked, I think. There should be a new pre-release with the latest changes.
Yes, my plan was to create a release, now that I have merged all the fixes. But… I will have to understand how that works. 😃 That might take some more days, because I guess there is some automated way to do this…
There could be another explanation, we probably need more details like a m-g-c code, real db content. We are trying to investigate the issue by comparing with a standard history-graph. In general this is correct - but since 2024.3 the history-graph is broken and can show wrong results - for instance, for periods where: – the entity has no changes – the entity was not created yet – the entity’s changes were not recorded i.e. personally me cannot consider history-graph now as a 100% correct proof.
🎉 This issue has been resolved in version 0.12.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
before I saw your post, I updated to dev.3 (from dev.2), and I don’t see it anymore. if I see it again, I’ll do as you suggested and post the results
Hmm… Maybe, it’s the same cache issue?
Because I think the fix should be the same for both primary and secondary graphs. So, if #880 fixes the zero tooltip on the primary graph, I would expect it to fix the zero tooltip for the secondary graph, too. But I might be mistaken.
(Thanks for the feedback on #880 fixing the primary tooltip at least, for you too!)
I’m also having this issue with a bar chart 😦
Not a solution, only a workaround:
I have a similar issue where it’s not just 0 values that don’t update the number displayed, it’s also “small values”. I used 0.55 hours of A/C on Saturday 3 Sept, but the number won’t indicate that.
Here’s the config of the card:
The current value is 1.96 hr, yet mousing over the bar which should show 0.55 hr doesn’t cause an update.