The versatile custom Swiss Army Knife card for Home Assistant allows you to create your unique visualization using several graphical tools, styling options and animations.
224
stars
19
forks
source link
Icon (ok) and segmented arc (nok) not showing the same color at exact colorstop limits #191
Before you file a bug, make sure that you did not make a configuration mistake. The Swiss Army Knife in its current state does not yet have full configuration sanity checks!
So make sure your problem is not related to that!
[x] Yes, I'm sure that it is not a configuration mistake
Bug description
A clear and concise description of what the bug is.
The colorstop limits are nog always consistent between segmented arc and animations.
The segmented arc stays green when percentage changes to 40% (why??), but after a browser refresh it becomes yellow. The battery percentage icon however stays green at 40%.
Both are using the same colorstop template. So this seems some calculation is going wrong to determine the current color in the segarc rendering after a refresh. Might be something about > or >= or < and <=.
Bug report notice
Before you file a bug, make sure that you did not make a configuration mistake. The Swiss Army Knife in its current state does not yet have full configuration sanity checks!
So make sure your problem is not related to that!
Bug description
A clear and concise description of what the bug is.
The colorstop limits are nog always consistent between segmented arc and animations. The segmented arc stays green when percentage changes to 40% (why??), but after a browser refresh it becomes yellow. The battery percentage icon however stays green at 40%.
Both are using the same colorstop template. So this seems some calculation is going wrong to determine the current color in the
segarc
rendering after a refresh. Might be something about > or >= or < and <=.Battery percentage at 40%:![image](https://user-images.githubusercontent.com/7996307/235436317-1226199e-bca9-4936-aa98-82b3b9e89032.png)
And battery percentage at 39%:![image](https://user-images.githubusercontent.com/7996307/235436466-2ad07d13-e19a-4ade-bed5-eef71390608c.png)
To Reproduce
Steps to reproduce the behavior:
YAML definition of view part:
The
colorstops_battery_level
template looks like this:Expected behavior
A clear and concise description of what you expected to happen.
Both the
icon
as thesegarc
are using the same (of course) colorstop template, so should show the same colors. Even after a refresh!Screenshots
If applicable, add screenshots to help explain your problem.
Desktop browser (please complete the following information):
Companion App on Smartphone/Tablet (please complete the following information):
Additional context Add any other context about the problem here.
(Optional): Suggested Solution
Any suggested solution to this bug.