-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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 current temperature #6954
Conversation
@aufano, thanks for your PR! By analyzing the history of the files in this pull request, we identified @turbokongen, @balloob and @fabaff to be potential reviewers. |
@@ -83,7 +83,7 @@ def update_properties(self): | |||
|
|||
# Current Temp | |||
if self.values.temperature: | |||
self._current_temperature = self.values.temperature.data | |||
self._current_temperature = (round((float(self.values.temperature.data)), 1)) |
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.
line too long (89 > 79 characters)
How many decimal places did this variable show? |
It's not up to platforms to round. Rounding is already done at the component level: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/climate/__init__.py#L415-L416 |
The fix was in the wrong place. Data has to be rounded on the component level and not the platform level. |
Ah ok!, I will fix the component level in #6960 thanks |
Description:
Now the variable current_temperature is rounded.
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:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass