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 bright level in set_led_brightness for miot purifiers #1477

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

borky
Copy link
Contributor

@borky borky commented Jul 24, 2022

For MIOT air purifiers the led brightness value is 0 for the Bright level and due to wrong check the Bright level could not be set. This PR fixes the check and adds tests to cover this device type.

@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2022

Codecov Report

Merging #1477 (a458f5f) into master (a782fd5) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1477      +/-   ##
==========================================
+ Coverage   82.47%   82.50%   +0.02%     
==========================================
  Files         140      140              
  Lines       13898    13907       +9     
  Branches     3304     1570    -1734     
==========================================
+ Hits        11463    11474      +11     
+ Misses       2215     2214       -1     
+ Partials      220      219       -1     
Impacted Files Coverage Δ
...integrations/airpurifier/zhimi/airpurifier_miot.py 81.73% <ø> (+0.91%) ⬆️
...s/airpurifier/zhimi/tests/test_airpurifier_miot.py 98.21% <100.00%> (+0.07%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@rytilahti rytilahti added the bug label Jul 25, 2022
Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Good catch, thanks for the PR @borky! 👍

@rytilahti rytilahti changed the title fixed bright level in set_led_brightness for miot purifiers fix bright level in set_led_brightness for miot purifiers Jul 25, 2022
@rytilahti rytilahti merged commit 41d8fdc into rytilahti:master Jul 25, 2022
@borky borky deleted the FixLedBrightnessMiotPurifier branch July 25, 2022 15:51
angelsl pushed a commit to angelsl/python-miio that referenced this pull request Jan 22, 2024
…1477)

Co-authored-by: borky-git <borky-git@protonmail.com>
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.

None yet

3 participants