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

Xiaomi MiIO Switch: Support for the Xiaomi Chuangmi Plug V3 #13271

Merged

Conversation

syssi
Copy link
Member

@syssi syssi commented Mar 16, 2018

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.

plug = PlugV3(host, token)
else:
from miio import PlugV1
plug = PlugV1(host, token)
Copy link
Member

@rytilahti rytilahti Mar 16, 2018

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.

Copy link
Member Author

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! 👍

Copy link
Member

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.

@rytilahti rytilahti changed the title Xiaomi MiIO Switch: Support for the Xiaomi Chuangmi Plug V3 WIP: Xiaomi MiIO Switch: Support for the Xiaomi Chuangmi Plug V3 Mar 18, 2018
@syssi
Copy link
Member Author

syssi commented Mar 28, 2018

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.

@syssi syssi force-pushed the feature/xiaomi-miio-switch-chuangmi-v3 branch from 0e9d63c to a9178fb Compare March 29, 2018 05:59
@syssi syssi changed the title WIP: Xiaomi MiIO Switch: Support for the Xiaomi Chuangmi Plug V3 Xiaomi MiIO Switch: Support for the Xiaomi Chuangmi Plug V3 Mar 29, 2018
@rytilahti
Copy link
Member

rytilahti commented Mar 30, 2018

Looks good to me, tested to work with zimi.powerstrip.v2, thanks! 👍

@rytilahti rytilahti merged commit 9cfcd38 into home-assistant:dev Mar 30, 2018
@balloob balloob mentioned this pull request Apr 13, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants