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

AirPurifier set_mode #213

Closed
airmonitor opened this issue Feb 10, 2018 · 1 comment
Closed

AirPurifier set_mode #213

airmonitor opened this issue Feb 10, 2018 · 1 comment

Comments

@airmonitor
Copy link

Hello,
Can I ask for small hint how to set up auto mode?
Tried:
airp = AirPurifier(filter_0_IP_address, filter_0_IP_token)
airp.set_mode("OperationMode.Auto")
airp.set_mode("Silent")
airp.set_mode("mode.auto")
airp.set_mode(mode=auto)

But constantly getting:
return self.send("set_mode", [mode.value])
AttributeError: 'str' object has no attribute 'value'

I'm new in python, sorry for newbie question :/

@airmonitor
Copy link
Author

Found solution, I was missing OperationMode in import

from miio.airpurifier import AirPurifier, OperationMode

airp.set_mode(OperationMode.Silent)

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

1 participant