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

Set mode for Air Purifier 2 not working #207

Closed
BerraKode opened this issue Feb 8, 2018 · 3 comments
Closed

Set mode for Air Purifier 2 not working #207

BerraKode opened this issue Feb 8, 2018 · 3 comments

Comments

@BerraKode
Copy link

I got all commands working for my Air Purifier 2 except "set_mode()". No matter what I try it won't work.

This is the error message I get:
-----> x.set_mode(OperationMode.Auto)
NameError: name 'OperationMode' is not defined <----

This is my code:

import miio as mi
ip = "192.168.0.XX"
token = "XXXXXXX"
x=mi.AirPurifier(ip, token)
x.set_mode(OperationMode.Auto)

I've tried all sorts of versions of "auto", mode.auto etc but nothing will work. What am I missing or is this not working anymore?

Thanks in advance!!!!

@syssi
Copy link
Collaborator

syssi commented Feb 9, 2018

@kofec
Copy link

kofec commented Feb 9, 2018

@syssi syssi closed this as completed Feb 10, 2018
@BerraKode
Copy link
Author

Thanks it's working now!! :)

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

No branches or pull requests

3 participants