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

Device support for the chuangmi plug v1 added #33

Merged
merged 5 commits into from
Aug 14, 2017

Conversation

syssi
Copy link
Collaborator

@syssi syssi commented Jul 23, 2017

No description provided.


class PlugV1Status:
"""Container for status reports from the plug."""
def __init__(self, data: Dict[str, Any]) -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined name 'Dict'
undefined name 'Any'

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example would also be nice here :-) Are those values already booleans or should they be converted below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

@rytilahti rytilahti Jul 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry for that, too many PRs got me confused. However, I think we can already merge this after fixing the conflict and update the information when we receive it. Btw, here's someone with the purifier, so at least we can get it tested easily, I hope: https://community.home-assistant.io/t/xiaomi-mi-air-purifier-support/14228/12

@rytilahti
Copy link
Owner

Do you happen to have the devtype (assuming it's usable at all..) / other identifying information we could use for discovering these new devices? The PR looks fine otherwise.

@syssi syssi changed the title Device support for the chuangmi plug v1 strip added Device support for the chuangmi plug v1 added Jul 25, 2017
@syssi
Copy link
Collaborator Author

syssi commented Jul 25, 2017

I requested the devtype and hope for feedback: https://community.home-assistant.io/t/xiaomi-mi-wifi-plug-air-purifier/16189/99

@rytilahti
Copy link
Owner

Btw, for the future, it's usually better to rebase than merge on PRs to keep the commit log cleaner :-)

@syssi
Copy link
Collaborator Author

syssi commented Jul 25, 2017

Got it. Thanks! I'm learning a lot.

@rytilahti
Copy link
Owner

We are also going to need mirobo -d info output from this device to add support to the (upcoming) new cli tool.

@syssi
Copy link
Collaborator Author

syssi commented Aug 4, 2017

The output is of the correct device if it contains

'model': 'chuangmi.plug.v1'

@rytilahti rytilahti merged commit 2e3039b into rytilahti:master Aug 14, 2017
@rytilahti
Copy link
Owner

Thanks again :) I think we are going to need to update the README to have information about other supported devices & their models.

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