Xiaomi Miio Air Purifier 2 (FAN)

Hello after conversing with Jbouwh (nice guy, btw thanks man) we decided the best course of action for xiaomi air purifiers gen 1 is to implement favorite bar slider from 0 to 16 (0 is unknown atm because i am not around the purifier to check what is happening if i set it to 0)

From what I see from my remote tests 0 is a valid speed if Favorite (maybe lowest setting?)

Discussion was first started here: Xiaomi Miio Air Purifier (FAN) · Issue #50221 · home-assistant/core · GitHub

So 0 is a valid speed 16 is the highest speed?
Are these equal steps? So 16 = 100% and 0 = 100 / 17 approx. 6 %?

This discussion should also be verified for other air purifiers. Further setting a speed using a fan preset should/could reset the current preset.

sry did not forget about this, tonight I reach that air purifier and test it out

Ok I’ve tested and is like this:
0 = lowest speed (it is a speed)
16 = maximum speed
17 = even if it appears it does nothing (should be removed)

Sry for long delay.

It gives an error message for the zhimi.airpurifier.m1
by Xiaomi.

Logger: homeassistant.components.xiaomi_miio.device
Source: components/xiaomi_miio/device.py:158
Integration: Xiaomi Miio (documentation, issues)
First occurred: 16:11:59 (3 occurrences)
Last logged: 16:16:29

Bad logger message: Setting the favorite level of the miio device failed. ((DeviceError({‘code’: -5001, ‘message’: ‘invaild_arg’}),))