-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Xiaomi MiIO Switch: Support for the Xiaomi Chuangmi Plug V3 #13271
Xiaomi MiIO Switch: Support for the Xiaomi Chuangmi Plug V3 #13271
Conversation
plug = PlugV3(host, token) | ||
else: | ||
from miio import PlugV1 | ||
plug = PlugV1(host, token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With python-miio maintainer hat on, should we try to merge PlugV1 and PlugV3 into one class (and allow specifying the type with an enum)?
edit: to add, otherwise this looks fairly straight-forward and good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge both devices into one class! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, great! This depends on rytilahti/python-miio#270 and a new version of python-miio then, I'll mark it as a WIP.
I've merged all plugs into one class. The change is part of python-miio 0.3.9. I will rebase this PR as soon the version bump is merged. |
0e9d63c
to
a9178fb
Compare
Looks good to me, tested to work with |
The Chuangmi V3 is very similar to the V1.
New features: The WiFi LED can be toggled and it reports the power consumption of the AC power outlet.