We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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!!!!
The text was updated successfully, but these errors were encountered:
You must import the OperationMode class:
https://github.com/rytilahti/python-miio/blob/master/miio/tests/test_airpurifier.py#L3-L5
Sorry, something went wrong.
Here you have example: https://github.com/kofec/domoticz-AirPurifier/blob/master/MyAir.py
Thanks it's working now!! :)
No branches or pull requests
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!!!!
The text was updated successfully, but these errors were encountered: