I did exactly that, except I use German server. No joy. Opened issue on GitHub a few days ago.
Maybe there are different hardware revisions?! Can you also install a python-miio package on the PC in the same subnet as the purifier and check the miiocli info output?
On a PC:
Install python for your OS
pip install python-miio
Execute miiocli cloud list to discover tokens of your devices from your cloud account. You will need to login using your Xiaomi account
miiocli -d device --ip x.x.x.x --token **** info replacing your device IP and token
Thanks, all information that I can see is the same as in my case.
I must admit that I have missed the part about selecting cloud connection explicitly. I always thought automatic should use any available method… Anyway, it works now.
However, there is no motor speed control in Manual/Favorite mode. I tried to manually set the Custom service.favorite level or Custom service.moto speed rpm attributes of the created fan entity, but it appears these are read-only.
I forgot to mention here that I have opened an issue on GitHub which has fixed the issue. Now connection works both in cloud and local mode, as well as in automatic mode.
I have also created a pull request to enable motor speed control when the device is in Favourite mode and it works fine.
The whole point of this is that my unit outputs low, but noticeable and unpleasant whining noise when motor rpm drops to lowest setting, either in Auto mode or manually in Favourite mode. It is actually quieter when its speed is set just above minimum than on real minimum. Therefore, Auto mode is not really useful to me, so I wanted to offload the logic of speed control to HA to avoid lowest rpm setting at all costs.
Hello Marco,
Quick questions, could this be compatible with my Xiaomi Air Purifier Lite 4?
In the input_select could I add the Sleep mode, or do I have to change anything more?
Currently this integration works for me in Automatic mode (I suppose it is mixed mode - firstly cloud connection is tried and the a local connection) but it seems to me that I’ve tried a Local mode and it worked for me too