paulearley / custom-fan-card6

Custom Fan Card for Modern Forms / WAC Fans
MIT License
3 stars 1 forks source link

Buttons 4 and 5 don't display color #2

Open jordahlm opened 3 years ago

jordahlm commented 3 years ago

I found that in the latest version to change to percents, buttons 4 and 5 don't display the color when active. I have fixed this on my system by setting the values to be 66 and 83 percent instead of 67 and 84 percent. It looks like they are being rounded for display, but internally use the exact numbers (66.66.. and 83.33..), and if the values in reality are not at least as large as in your template it won't show the color.

paulearley commented 3 years ago

Thanks will make these changes in next revision. Let me know if you have any other suggestions.Paul On Friday, July 16, 2021, 01:48:50 PM EDT, jordahlm @.***> wrote:

I found that in the latest version to change to percents, buttons 4 and 5 don't display the color when active. I have fixed this on my system by setting the values to be 66 and 83 percent instead of 67 and 84 percent. It looks like they are being rounded for display, but internally use the exact numbers (66.66.. and 83.33..), and if the values in reality are not at least as large as in your template it won't show the color.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

paulearley commented 3 years ago

I looked at the values for percentage in my JavaScript debugger and on my end they are integers. So I changed the values for fan percentage to: let percent1 = 16; let percent2 = 33; let percent3 = 50; let percent4 = 66; let percent5 = 83; let percent6 = 100;

Not sure why it was acting differently initially.