Skip to content
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

Round humidity for display purposes #12766

Merged
merged 1 commit into from Feb 28, 2018

Conversation

PhilRW
Copy link
Contributor

@PhilRW PhilRW commented Feb 27, 2018

Description:

Humidity was not being rounded as temperature was. This change fixes that.

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@balloob
Copy link
Member

balloob commented Feb 28, 2018

I don't think it's a good idea to rename the helper. It's overkill for humidity. This can just remain inside the weather component. It also doesn't need all the fancy rounding logic because there is only 1 unit which is treated the same. We should just add a round to this line: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/weather/__init__.py#L113

@PhilRW
Copy link
Contributor Author

PhilRW commented Feb 28, 2018

Well, yeah, if you want to be simple and efficient. Sheesh. 🙄 😄

Humidity was not being rounded as temperature was. This change fixes
that.
@PhilRW PhilRW changed the title Implement humidity precision helper method Round humidity for display purposes Feb 28, 2018
Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So clean and lean, love it 🎉

@balloob balloob merged commit e82b358 into home-assistant:dev Feb 28, 2018
@PhilRW PhilRW deleted the weather_humidity_precision branch February 28, 2018 21:12
@balloob balloob mentioned this pull request Mar 9, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants