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

Add Air Purifier Pro H support #1185

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

pvizeli
Copy link
Contributor

@pvizeli pvizeli commented Nov 15, 2021

Success of #1093

The Pro H works like the 3H just a bit bigger.

@pvizeli
Copy link
Contributor Author

pvizeli commented Nov 19, 2021

According: #1186

I did not notice that. How is the best way to address this?

@rytilahti
Copy link
Owner

Considering it's working already, I would simply add it to the supported devices in the integration itself. The implementing class (AirPurifierMiot) does not currently have _supported_devices variable, but one should be added as the plan is to start using that information to allow initializing device classes based on the model information.

The mdns discovery information is not currently used at all, but it could be a part of extended metadata that will in the future get exposed over the supported_devices(). The aim is to move out device specific handling inside the lib so that downstreams do not have to keep their own mappings for things.

@codecov-commenter
Copy link

Codecov Report

Merging #1185 (50ccbc4) into master (452d436) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1185   +/-   ##
=======================================
  Coverage   78.31%   78.31%           
=======================================
  Files          84       84           
  Lines        9532     9532           
  Branches      778      778           
=======================================
  Hits         7465     7465           
  Misses       1880     1880           
  Partials      187      187           
Impacted Files Coverage Δ
miio/discovery.py 49.33% <ø> (ø)

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 452d436...50ccbc4. Read the comment docs.

@rytilahti rytilahti merged commit fe168d4 into rytilahti:master Nov 30, 2021
@pvizeli
Copy link
Contributor Author

pvizeli commented Nov 30, 2021

What I do not understand is why it work as mb3 device but the linked URL #1186 is complete different mapping

@rytilahti rytilahti mentioned this pull request Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants