-
Notifications
You must be signed in to change notification settings - Fork 26
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
Animation Not working as expected #36
Comments
Same issue here! |
That is probably caused by this upstream issue: Edit: |
I'm seeing the same thing. Just installed 0.4.1. Had to turn animation to False to avoid the annoying flickering back to 0 on every update. These gauges are very cool though - thanks for making this available to Home Assistant!!! |
Same issue here, not that it needs much confirmation at this point. It would be great to know the cause! |
At least I can stop chasing this in my configuration. I'd love a fix as well. |
Would also love to see a fix for this. |
any uptade to this? |
|
I did some debugging recently, and I figured, that the gauge card gets initialized every time, a new value is reported. That means, that the current value (the value, that the needle shows) is reset to zero and thus, the animation always starts at zero. I tried to add some additional members and store values, they all get reset as well. So my guess is, that the embedding of the gauge in home assistant causes the trouble. The gauge itself is working fine. |
Hm. You seem to be right. Could it be as easy as wrapping everything from canvas-gauge-card/src/canvas-gauge-card.ts Line 123 in 929c18a
canvas-gauge-card/src/canvas-gauge-card.ts Line 145 in 929c18a
if this_gauge != none { } or something?
|
Should be fixed in version 0,7 |
Thank you for this @helto4real - I'm not sure the fixed JS made it into the release though? I don't see the changes after updating. |
|
Animation of gauge not working as expected. It doesn't animate from the old value to the new, but 0 to the new. According to the description of the canvas-gauges (https://canvas-gauges.com/documentation/user-guide/configuration), it should animate the needle from old to new value.
Here is my (lovelace) config of the card:
card_height: 175
entity: sensor.verbruik_current
gauge:
animation: true
animationDuration: 1500
animationRule: linear
borderInnerWidth: 0
borderMiddleWidth: 0
borderOuterWidth: 0
borderShadowWidth: 0
borders: false
height: 175
highlights:
- color: 'rgba(200, 50, 50, .75)'
from: 4000
to: 5000
majorTicks:
- '0'
- ' '
- '1000'
- ' '
- '2000'
- ' '
- '3000'
- ' '
- '4000'
- ' '
- '5000'
maxValue: 5000
minValue: 0
minorTicks: 5
startAngle: 45
strokeTicks: false
ticksAngle: 270
title: Verbruik (W)
type: radial-gauge
valueBox: true
valueDec: 0
width: 200
type: 'custom:canvas-gauge-card'
The text was updated successfully, but these errors were encountered: