Add support for Xiaomi Smart Standing Fan 2 Pro (dmaker.fan.p33) #1467
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for the Xiaomi Smart Standing Fan 2 Pro. I've tested it and everything seems functional. I compared https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p33:1 to the already supported https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p11:1 and from what I can tell they are functionally identical.
I noticed I get a warning:
Found an unsupported model 'dmaker.fan.p33' for class 'FanMiot'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/
, but I'm not sure what constitutes a model being "supported", so I didn't do anything there.From looking at the source code, it doesn't look like any of theFanMiot
devices are being added to_supported_models
.Edit: Looking at this some more I see that
_models
is used instead of_supported_models
, and that the device is added toFanMiot.supported_models
:FanMiot.supported_models dict_keys(['dmaker.fan.p9', 'dmaker.fan.p10', 'dmaker.fan.p11', 'dmaker.fan.p15', 'dmaker.fan.p18', 'dmaker.fan.p33'])
, so I'm not sure why the warning is still there.Second Edit: Ok, nevermind. I see now that you always get the warning if you don't run
fan.info()
prior to running one of the other commands. User error! :)Please let me know if I should change anything there!
Thanks for a great easy to use project!