-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a point with a zero value is selected - then a wrong state is displayed #805
Comments
Chiming in to say that I can reproduce the issue with a simple graph, no aggregation
|
I confirm that I also have this problem: |
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. |
It just shouldn't show any bar at all when 0. First I thought chart was wrong with the shorter bar showing a higher value than the larger bar next to it. But it was the total 24 hour value. |
Everyone who faced this issue with a line graph and w/o an aggregation - have you tried to set |
I'm also having this issue with a bar chart :( |
I'm having the same issue with a line chart.
|
I do not yet understand fully the logics in this card, so forgive me, if I am stupidly mistaken. I'd also test this myself. But I don't know yet, how to do that. So, here I am, trying to help "offline"... I browsed through the code and found this line: Line 288 in 8e70381
It looks to me, as if the |
Has this fix been pushed out? I am still getting the same value with zero values showing the max value and not zero `entities:
|
#880 should fix this issue. But we haven't merged it yet. |
@akloeckner unfortunately I don't see that it fixed the issue. |
sorry, my bad, looks like it was a cache issue, I tried in another browser and it seems to do the job, so thanks! edit: just stupid cache issues |
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!) |
yes, same cache issue, sorry about that. |
Ok, thanks for the feedback! I'll try and merge it soon. I just want to get some guidelines straight before that... |
@akloeckner I see you commit on the dev branch. |
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... |
# [0.12.0-dev.1](v0.11.0...v0.12.0-dev.1) (2023-04-22) ### Bug Fixes * add first datapoint tooltip for line graph ([#882](#882)) ([7576fe6](7576fe6)) * allow zero tooltip ([057a395](057a395)), closes [#805](#805) * drop out-of-bound coords in reducer ([#881](#881)) ([527f005](527f005)), closes [#251](#251) * **documentation:** enquote html color ([dbdeab8](dbdeab8)), closes [#872](#872) * **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f)) * **workflows:** remove invalid description field ([e755e24](e755e24)) ### Features * **option:** override icon with an image URL ([#789](#789)) ([2860a09](2860a09))
🎉 This issue has been resolved in version 0.12.0-dev.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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. |
looking good, I'm on the dev release 0.12.0-dev.2 |
seems like this introduced a new bug (not sure): |
From how I understand the current - but also the old - code, that should have happened before as well. The first point on the graph is the first data point within the history period. So, 17%. But I might miss some subtlety. Can you check with an older version of the card, before my change? |
before I saw your post, I updated to dev.3 (from dev.2), and I don't see it anymore. |
# [0.12.0](v0.11.0...v0.12.0) (2024-01-27) ### Bug Fixes * add first datapoint tooltip for line graph ([#882](#882)) ([7576fe6](7576fe6)) * allow zero tooltip ([057a395](057a395)), closes [#805](#805) * cards would always assume icon_image was set ([#957](#957)) ([f376732](f376732)) * drop out-of-bound coords in reducer ([#881](#881)) ([527f005](527f005)), closes [#251](#251) * retain the last out-of-bounds state ([#961](#961)) ([8ebe173](8ebe173)), closes [#881](#881) [#960](#960) * **documentation:** enquote html color ([dbdeab8](dbdeab8)), closes [#872](#872) * **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f)) * **workflows:** remove invalid description field ([e755e24](e755e24)) ### Features * Add support of attribute tree when available ([#996](#996)) ([9c1c31e](9c1c31e)) * pull two years worth of changes into release channel ([f5fb98d](f5fb98d)), closes [#1059](#1059) * **option:** override icon with an image URL ([#789](#789)) ([2860a09](2860a09))
🎉 This issue has been resolved in version 0.12.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
I think, your seeing a different issue with similar symptoms. Since there is no data before March 8, the code just uses the earliest (I believe) data point also for the missing points in time. That makes sense for continuous data, because the home assistant history only stores data when the state changes. So, it's reasonable to assume the state hasn't changed if there is no data in a given interval. (Although we seem to do this after aggregating over the day, while we should actually do it before aggregating.) While I acknowledge the result is not correct in your case, it's maybe ok to ignore for now. When - in 11 days - there's enough data, the issue should go away and not come back. 😉 |
There could be another explanation, we probably need more details like a m-g-c code, real db content. |
I'm having a similar problem with a water flow graph. The sensor sends updates every 10 seconds but the graph often seems to ignore the zero data. That long flat part in the graph to the right was zero that whole time but it gets graphed at the last non-zero value instead. I've verified the sensor was sending zeros the whole time. |
I suggest you open a new issue for this, as it seems not the same as the original issue here. It's likely the same issue as adamzimnyy sees. For troubleshooting, try to set points per hour really high, at least 360. (The aim should be for the first zero value to be in its own averaging time window. The average zero should then carry over to the following period.) |
# 1.0.0 (2024-12-15) ### Bug Fixes * add first datapoint tooltip for line graph ([kalkih#882](https://github.com/motorlatitude/mini-graph-card/issues/882)) ([7576fe6](7576fe6)) * allow zero tooltip ([057a395](057a395)), closes [kalkih#805](https://github.com/motorlatitude/mini-graph-card/issues/805) * cards would always assume icon_image was set ([kalkih#957](https://github.com/motorlatitude/mini-graph-card/issues/957)) ([f376732](f376732)) * display a warning if entity is not available ([kalkih#545](https://github.com/motorlatitude/mini-graph-card/issues/545)) ([a334b84](a334b84)), closes [kalkih#487](https://github.com/motorlatitude/mini-graph-card/issues/487) * drop out-of-bound coords in reducer ([kalkih#881](https://github.com/motorlatitude/mini-graph-card/issues/881)) ([527f005](527f005)), closes [kalkih#251](https://github.com/motorlatitude/mini-graph-card/issues/251) * Fix undefined variable introduced by [kalkih#545](https://github.com/motorlatitude/mini-graph-card/issues/545) ([9e923f5](9e923f5)) * icon will properly follow entity's device_class [[kalkih#484](https://github.com/motorlatitude/mini-graph-card/issues/484)] ([2f9e0a7](2f9e0a7)) * retain the last out-of-bounds state ([kalkih#961](https://github.com/motorlatitude/mini-graph-card/issues/961)) ([8ebe173](8ebe173)), closes [kalkih#881](https://github.com/motorlatitude/mini-graph-card/issues/881) [kalkih#960](https://github.com/motorlatitude/mini-graph-card/issues/960) * Support for `fire-dom-event` ([c29f55f](c29f55f)), closes [kalkih#563](https://github.com/motorlatitude/mini-graph-card/issues/563) * tooltip interval start could be after end ([kalkih#1065](https://github.com/motorlatitude/mini-graph-card/issues/1065)) ([930ee39](930ee39)), closes [kalkih#181](https://github.com/motorlatitude/mini-graph-card/issues/181) * **config:** Remove entity config error [kalkih#592](https://github.com/motorlatitude/mini-graph-card/issues/592) ([kalkih#593](https://github.com/motorlatitude/mini-graph-card/issues/593)) ([53d923a](53d923a)) * **documentation:** enquote html color ([dbdeab8](dbdeab8)), closes [kalkih#872](https://github.com/motorlatitude/mini-graph-card/issues/872) * **log:** color_thresholds render incorectly with logaritmic on ([kalkih#542](https://github.com/motorlatitude/mini-graph-card/issues/542)) ([b704885](b704885)), closes [kalkih#531](https://github.com/motorlatitude/mini-graph-card/issues/531) * **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f)) * **workflows:** remove invalid description field ([e755e24](e755e24)) * Time would sometime display 24:xx instead of 00:xx [[kalkih#536](https://github.com/motorlatitude/mini-graph-card/issues/536)] ([7c7d921](7c7d921)) ### Features * Add support of attribute tree when available ([kalkih#996](https://github.com/motorlatitude/mini-graph-card/issues/996)) ([9c1c31e](9c1c31e)) * Interpolate color threshold stops ([kalkih#596](https://github.com/motorlatitude/mini-graph-card/issues/596)) ([3826c0d](3826c0d)) * pull two years worth of changes into release channel ([f5fb98d](f5fb98d)), closes [kalkih#1059](https://github.com/motorlatitude/mini-graph-card/issues/1059) * **attribute:** Retrieve an attribute instead of the state ([kalkih#564](https://github.com/motorlatitude/mini-graph-card/issues/564)) ([708bfde](708bfde)), closes [kalkih#411](https://github.com/motorlatitude/mini-graph-card/issues/411) [kalkih#245](https://github.com/motorlatitude/mini-graph-card/issues/245) [kalkih#501](https://github.com/motorlatitude/mini-graph-card/issues/501) * **graph:** Add median aggregate function ([kalkih#521](https://github.com/motorlatitude/mini-graph-card/issues/521)) ([57219bd](57219bd)) * **option:** override icon with an image URL ([kalkih#789](https://github.com/motorlatitude/mini-graph-card/issues/789)) ([2860a09](2860a09)) * Format numbers according to selected language [[kalkih#495](https://github.com/motorlatitude/mini-graph-card/issues/495) [kalkih#509](https://github.com/motorlatitude/mini-graph-card/issues/509)] ([5785bd8](5785bd8))
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:
The result seems correct:
![mgc 01](https://user-images.githubusercontent.com/13657180/176176525-7039c08c-59b7-4789-9f85-79697bde8722.png)
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":
![mcg06](https://user-images.githubusercontent.com/13657180/176177894-ce4c8d54-8e14-4257-8436-174ec2367230.png)
Is my configuration wrong, or is it a card issue?
Thanks!
The text was updated successfully, but these errors were encountered: