mlamberts78 / weather-chart-card

Custom weather card with charts.
MIT License
246 stars 26 forks source link

Wind guust speed using too many decimal places #196

Open cryptk opened 2 weeks ago

cryptk commented 2 weeks ago

Describe the bug Despite my wind gust sensor being set to 2 decimal places, the card is rendering a lot more decimal places

To Reproduce Steps to reproduce the behavior:

  1. Have a wind gust speed sensor
  2. Set it to a reasonable number of decimal places (this is what mine is set to by default)
  3. Observe the wind gust speed using a lot of decimal places in the card

Expected behavior I expect the card to respect the requested number of decimal places on the sensor just as everything else does

Screenshots Untitled

Desktop (please complete the following information):

Additional context It doesn't seem to matter what number of decimal places I request for any of the sensors, the card seems to ignore those settings. That said, while it implements it's own rounding for most things, it does not appear to round the gust speed at all.

Ideally, the card should respect the user selected rounding, but it should at least round the gust speed to some sane number of decimal places.