ulic75 / power-flow-card

A power distribution card inspired by the official Energy Distribution card for Home Assistant
168 stars 27 forks source link

Dots jumping on Safari based UIs #82

Closed SparkyDan555 closed 2 years ago

SparkyDan555 commented 2 years ago

My entities update every second and when they do, the dots traversing the lines jump positions. They don't flow smoothly along the lines. To make matters worse, the entity for solar production doesn't always update at the same time as the entity for grid import/export so the dots jump around ver half a second or so. I think a fix needs to be implemented so the speed of the dots changes when the entities change in real-time, not just by calculating the time to travel along the line at the start of its path. i.e. if the power increases midway through the dot's travel, it speeds up right there and then.

ulic75 commented 2 years ago

This functionality should exist already as it was an initial issue I had to overcome when designing the card. I'd have to build some kind of custom setup to try to update multiple values every 0.5-1s to try to simulate what you describe.

SparkyDan555 commented 2 years ago

See the following screen recording as an example. When the values update, the dots kind of glitch and don't flow smoothly:

https://user-images.githubusercontent.com/38540799/177394989-e9a99241-8f63-40aa-bea3-d4c6391ae759.mov

ulic75 commented 2 years ago

Have you tried other browsers? Can you provide me your browser specifics?

SparkyDan555 commented 2 years ago

Just tried it in Chrome and it works okay. It seems to glitch in the Home Assistant companion app (2022.358) on iPhone, in Safari 15.5 on Mac and the companion app on Mac.

ulic75 commented 2 years ago

I was able to reproduce it in Safari. So at least I have something to test against.

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 2.5.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

ulic75 commented 2 years ago

Could be a little janky still, but should be an improvement.

SparkyDan555 commented 2 years ago

That looks much smoother, great work!

emign commented 2 years ago

Hi. I use v 2.5.1 and I encounter the same problem. Its not as bad as the recording above but still noticeable. Especially if you use an iPad as Home dashboard. Can we maybe add a setting, which lets the card only update every x seconds?

https://user-images.githubusercontent.com/5278352/191817007-bfd1e555-13ff-4a18-83fa-f50cbaeaddb1.mov