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 Awair sensor values #24093

Merged
merged 4 commits into from Jun 1, 2019
Merged

Conversation

danielsjf
Copy link
Contributor

@danielsjf danielsjf commented May 24, 2019

Description:

Currently the sensor reports about 10 figures after the comma which isn't useful in the overview (numbers end in ...). This PR rounds it to one figure after the comma instead which is around the sensor precision anyway.

Should fix #20034

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

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

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

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@danielsjf danielsjf marked this pull request as ready for review May 25, 2019 10:51
@fabaff
Copy link
Member

fabaff commented May 31, 2019

Can you please rebase? The PR contains some changes in CODEOWNERS which seems unrelated.

@danielsjf
Copy link
Contributor Author

@fabaff I got errors in the tests due to the code owners. I added my git name and ran the tool to fix it but indeed after running the tool some things seemed weird. Will rebase now and run the tool again.

@codecov
Copy link

codecov bot commented May 31, 2019

Codecov Report

Merging #24093 into dev will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #24093      +/-   ##
==========================================
- Coverage   94.21%   94.13%   -0.09%     
==========================================
  Files         506      501       -5     
  Lines       39639    39405     -234     
==========================================
- Hits        37347    37094     -253     
- Misses       2292     2311      +19
Impacted Files Coverage Δ
homeassistant/components/awair/sensor.py 95.09% <100%> (ø) ⬆️
...omeassistant/components/locative/device_tracker.py 86.66% <0%> (-10.9%) ⬇️
...omeassistant/components/geofency/device_tracker.py 85.71% <0%> (-10.04%) ⬇️
...meassistant/components/gpslogger/device_tracker.py 86.66% <0%> (-9.42%) ⬇️
...meassistant/components/owntracks/device_tracker.py 91% <0%> (-7.42%) ⬇️
homeassistant/bootstrap.py 75.28% <0%> (-5.46%) ⬇️
homeassistant/components/deconz/sensor.py 95.83% <0%> (-4.17%) ⬇️
homeassistant/helpers/area_registry.py 95.91% <0%> (-3.07%) ⬇️
homeassistant/components/deconz/binary_sensor.py 91.48% <0%> (-2.63%) ⬇️
homeassistant/util/location.py 86.66% <0%> (-2.23%) ⬇️
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9c85b9...261e2f3. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented May 31, 2019

Codecov Report

Merging #24093 into dev will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #24093      +/-   ##
==========================================
- Coverage   94.21%   94.13%   -0.09%     
==========================================
  Files         506      501       -5     
  Lines       39639    39405     -234     
==========================================
- Hits        37347    37094     -253     
- Misses       2292     2311      +19
Impacted Files Coverage Δ
homeassistant/components/awair/sensor.py 95.09% <100%> (ø) ⬆️
...omeassistant/components/locative/device_tracker.py 86.66% <0%> (-10.9%) ⬇️
...omeassistant/components/geofency/device_tracker.py 85.71% <0%> (-10.04%) ⬇️
...meassistant/components/gpslogger/device_tracker.py 86.66% <0%> (-9.42%) ⬇️
...meassistant/components/owntracks/device_tracker.py 91% <0%> (-7.42%) ⬇️
homeassistant/bootstrap.py 75.28% <0%> (-5.46%) ⬇️
homeassistant/components/deconz/sensor.py 95.83% <0%> (-4.17%) ⬇️
homeassistant/helpers/area_registry.py 95.91% <0%> (-3.07%) ⬇️
homeassistant/components/deconz/binary_sensor.py 91.48% <0%> (-2.63%) ⬇️
homeassistant/util/location.py 86.66% <0%> (-2.23%) ⬇️
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9c85b9...261e2f3. Read the comment docs.

@danielsjf
Copy link
Contributor Author

@fabaff, thanks for the review. It should be better now.

@Danielhiversen Danielhiversen merged commit 278b9d0 into home-assistant:dev Jun 1, 2019
@balloob balloob mentioned this pull request Jun 26, 2019
alandtse pushed a commit to alandtse/home-assistant that referenced this pull request Oct 12, 2019
* Round sensor values

* Add code owner

* Update code owners

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

awair sensor ... sensor precision
4 participants