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

Fix current_temperature is rounded #6960

Merged
merged 2 commits into from Apr 7, 2017

Conversation

Projects
None yet
4 participants
@aufano
Copy link
Contributor

commented Apr 6, 2017

Description:

Fix now when temperature_unit == unit_of_measurement the convert_to_display will round it.

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

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.

@aufano aufano referenced this pull request Apr 6, 2017

Closed

Round current temperature #6954

0 of 8 tasks complete
@armills

This comment has been minimized.

Copy link
Contributor

commented Apr 6, 2017

See also #4522

@aufano

This comment has been minimized.

Copy link
Contributor Author

commented Apr 6, 2017

I dont know the right way to fix the problem because in the #4522 @balloob said "Do not convert when passed in unit is already expected unit" but the problem is that my zwave radiator pass a lot of decimals in celsius and I have my home assistant temperature in celsius too.., so the code don't round it.

@armills

This comment has been minimized.

Copy link
Contributor

commented Apr 6, 2017

I think this is a reasonable fix myself, but I want to make sure we're looking at the whole history of this code in case there was some other relevant side-effect from the previous PR. (Want to make sure we're jogging @balloob's memory. 😄 )

In any case showing all of the decimal places in the frontend is a defect IMO, and we need some solution.

@balloob

This comment has been minimized.

Copy link
Member

commented Apr 7, 2017

Yeah this looks good. Thanks for the fix 🐬

@balloob balloob merged commit 2ce8c2f into home-assistant:dev Apr 7, 2017

4 checks passed

cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.03%) to 93.691%
Details
hound No violations found. Woof!

@balloob balloob added this to the 0.42 milestone Apr 7, 2017

balloob added a commit that referenced this pull request Apr 8, 2017

Fix current_temperature is rounded (#6960)
* Fix current_temperature is rounded

* fix  Unnecessary parens after 'if'
@balloob

This comment has been minimized.

Copy link
Member

commented Apr 8, 2017

Cherry-picked into the 0.42 branch

@fabaff fabaff referenced this pull request Apr 8, 2017

Merged

0.42 #6956

@balloob balloob referenced this pull request Apr 21, 2017

Merged

0.43 #7197

@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.