decompil3d / lovelace-hourly-weather

Hourly weather card for Home Assistant. Visualize upcoming weather conditions as a colored horizontal bar.
MIT License
293 stars 31 forks source link

Feature: Option to round fractional temperatures to whole numbers #609

Closed mattchesters closed 6 months ago

mattchesters commented 8 months ago

This PR adds an additional option to display fractional hourly temperatures into their nearest whole number.

image

Behavior change:

By default, the existing default behavior is observed, where fractional temperatures are rendered if the weather entity is serving fractional temperatures.

When the round_temperatures: true is specified, the number served by weather entity is rounded to the nearest whole number using Math.round().

Tests

Tests have been modified, to include a fractional temperature in mock data.

wsw70 commented 6 months ago

Would there be a chance to merge this PR? It is an awesome addition.