Skip to content

Set mode for Air Purifier 2 not working #207

@BerraKode

Description

@BerraKode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions