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

Skip warning if the unknown model is reported on a base class #1243

Merged
merged 2 commits into from
Dec 13, 2021

Conversation

rytilahti
Copy link
Owner

It is fine to use the base classes to execute commands (like info()) which currently yields a warning about unknown classes. This will suppress such warnings when the class in question is Device or MiotDevice.

Fixes #1238

@rytilahti rytilahti force-pushed the fix/skip_unknown_model_logging_on_baseclasses branch from 16a6307 to b359b60 Compare December 13, 2021 17:52
@codecov-commenter
Copy link

Codecov Report

Merging #1243 (b359b60) into master (48979b4) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1243      +/-   ##
==========================================
+ Coverage   79.26%   79.28%   +0.01%     
==========================================
  Files          90       90              
  Lines        9729     9731       +2     
  Branches     1130     1130              
==========================================
+ Hits         7712     7715       +3     
+ Misses       1825     1824       -1     
  Partials      192      192              
Impacted Files Coverage Δ
miio/device.py 55.10% <100.00%> (+0.61%) ⬆️
miio/integrations/vacuum/roborock/vacuum.py 61.53% <0.00%> (+0.21%) ⬆️

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 48979b4...b359b60. Read the comment docs.

@rytilahti rytilahti merged commit 4315253 into master Dec 13, 2021
@rytilahti rytilahti deleted the fix/skip_unknown_model_logging_on_baseclasses branch December 13, 2021 18:03
rytilahti added a commit that referenced this pull request Dec 14, 2021
This release fixes regressions caused by the recent refactoring related to supported models:
* philips_bulb now defaults to a bulb that has color temperature setting
* gateway devices do not perform an info query as that is handled by their parent

Also, the list of the supported models was extended thanks to the feedback from the community!

[Full Changelog](0.5.9.1...0.5.9.2)

**Implemented enhancements:**

- Add yeelink.bhf\_light.v2 and yeelink.light.lamp22 support [\#1250](#1250) ([FaintGhost](https://github.com/FaintGhost))
- Skip warning if the unknown model is reported on a base class [\#1243](#1243) ([rytilahti](https://github.com/rytilahti))
- Add emptying bin status for roborock s7+ [\#1190](#1190) ([rytilahti](https://github.com/rytilahti))

**Fixed bugs:**

- Fix Roborock S7 fan speed [\#1235](#1235) ([shred86](https://github.com/shred86))
- gateway: remove click support for gateway devices [\#1229](#1229) ([starkillerOG](https://github.com/starkillerOG))
- mirobo: make sure config always exists [\#1207](#1207) ([rytilahti](https://github.com/rytilahti))
- Fix typo [\#1204](#1204) ([com30n](https://github.com/com30n))

**Merged pull requests:**

- philips\_eyecare: add philips.light.sread1 as supported [\#1246](#1246) ([rytilahti](https://github.com/rytilahti))
- Add yeelink.light.color3 support [\#1245](#1245) ([Kirmas](https://github.com/Kirmas))
- Use codecov-action@v2 for CI [\#1244](#1244) ([rytilahti](https://github.com/rytilahti))
- Add yeelink.light.color5 support [\#1242](#1242) ([Kirmas](https://github.com/Kirmas))
- Add more supported devices to their corresponding classes [\#1237](#1237) ([rytilahti](https://github.com/rytilahti))
- Add zhimi.humidfier.ca4 as supported model [\#1220](#1220) ([jbouwh](https://github.com/jbouwh))
- vacuum: Add t7s \(roborock.vacuum.a14\) [\#1214](#1214) ([rytilahti](https://github.com/rytilahti))
- philips\_bulb: add philips.light.downlight to supported devices [\#1212](#1212) ([rytilahti](https://github.com/rytilahti))
@rytilahti rytilahti mentioned this pull request Dec 14, 2021
rytilahti added a commit that referenced this pull request Dec 14, 2021
This release fixes regressions caused by the recent refactoring related to supported models:
* philips_bulb now defaults to a bulb that has color temperature setting
* gateway devices do not perform an info query as that is handled by their parent

Also, the list of the supported models was extended thanks to the feedback from the community!

[Full Changelog](0.5.9.1...0.5.9.2)

**Implemented enhancements:**

- Add yeelink.bhf\_light.v2 and yeelink.light.lamp22 support [\#1250](#1250) ([FaintGhost](https://github.com/FaintGhost))
- Skip warning if the unknown model is reported on a base class [\#1243](#1243) ([rytilahti](https://github.com/rytilahti))
- Add emptying bin status for roborock s7+ [\#1190](#1190) ([rytilahti](https://github.com/rytilahti))

**Fixed bugs:**

- Fix Roborock S7 fan speed [\#1235](#1235) ([shred86](https://github.com/shred86))
- gateway: remove click support for gateway devices [\#1229](#1229) ([starkillerOG](https://github.com/starkillerOG))
- mirobo: make sure config always exists [\#1207](#1207) ([rytilahti](https://github.com/rytilahti))
- Fix typo [\#1204](#1204) ([com30n](https://github.com/com30n))

**Merged pull requests:**

- philips\_eyecare: add philips.light.sread1 as supported [\#1246](#1246) ([rytilahti](https://github.com/rytilahti))
- Add yeelink.light.color3 support [\#1245](#1245) ([Kirmas](https://github.com/Kirmas))
- Use codecov-action@v2 for CI [\#1244](#1244) ([rytilahti](https://github.com/rytilahti))
- Add yeelink.light.color5 support [\#1242](#1242) ([Kirmas](https://github.com/Kirmas))
- Add more supported devices to their corresponding classes [\#1237](#1237) ([rytilahti](https://github.com/rytilahti))
- Add zhimi.humidfier.ca4 as supported model [\#1220](#1220) ([jbouwh](https://github.com/jbouwh))
- vacuum: Add t7s \(roborock.vacuum.a14\) [\#1214](#1214) ([rytilahti](https://github.com/rytilahti))
- philips\_bulb: add philips.light.downlight to supported devices [\#1212](#1212) ([rytilahti](https://github.com/rytilahti))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants