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

Don't truncate brightness and white_value of MQTT light #19502

Merged
merged 2 commits into from Dec 27, 2018

Conversation

Projects
None yet
3 participants
@emontnemery
Copy link
Contributor

emontnemery commented Dec 21, 2018

Description:

Round instead of truncating brightness and white_value.

When truncating, a light with on_command_type = 'brightness' and brightness_scale = 100 will have its brightness lowered by one step each time the light is turned on.
Fix by storing the brightness in the entity with full precision, and rounding instead of truncating, when getting the property or communicating with HW.

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.

@fabaff fabaff changed the title MQTT light: Don't truncate brightness and white_value Don't truncate brightness and white_value of MQTT light Dec 23, 2018

@fabaff

fabaff approved these changes Dec 27, 2018

Copy link
Member

fabaff left a comment

Looks good to me 🐦

@fabaff fabaff merged commit f9aa364 into home-assistant:dev Dec 27, 2018

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.001%) to 93.056%
Details

@wafflebot wafflebot bot removed the in progress label Dec 27, 2018

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment