-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Option to round fractional temperatures to whole numbers #609
Feature: Option to round fractional temperatures to whole numbers #609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Just a small nitpick and a question for you.
Co-authored-by: Jonathan Keslin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adjusting. One more small fix and I think we'll be good.
Co-authored-by: Jonathan Keslin <[email protected]>
Would there be a chance to merge this PR? It is an awesome addition. |
This PR adds an additional option to display fractional hourly temperatures into their nearest whole number.
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.