homebridge-mi-airpurifier icon indicating copy to clipboard operation
homebridge-mi-airpurifier copied to clipboard

Fan Speed fix for Air Purifier Pro

Open A320Peter opened this issue 5 years ago • 2 comments

This is a bug fix for Air Purifier Pro

Adjusting the FAN SPEED in MANUAL mode in the Home App, the FAN SPEED slider has values from 0-100. This plugin translates the slider setting to a number between 0 and 10, so sending out this parsed value to the air purifier. I assume the reason is that other Xiaomi Air Purifiers using fan speed settings from 0 - 10. However, Air Purifier Pro supports 17 different values for the FAN SPEED (in Mi App the minimum setting is 7-12m2 and the maximum is 35-60m2). All together there are 17 different values available. Because the plugin limit is 10, so the maximum FAN SPEED setting stops around ~60%. When the plugin checks for the actual fan speed to adjust the slider position, the same incorrect calculation results in setting the slider to the lower range instead of the actual speed.

I used a different formula to translate the slider setting to a value between 1 and 17.

A320Peter avatar Jan 14 '19 22:01 A320Peter

Hello @YinHangCode could you please review and merge this PR? If you dont have time please give the rights to someone else. I might fix some issues or improve features but i need the rights to do so or at least you have to merge pull requests. If you dont i can not put time into this or we have to fork maybe but i would like to keep this project alive instead!

MickL avatar Jun 13 '19 21:06 MickL

Completely agree with @MickL, pls, @MickL why not you create new plugin to have this "awesome features" ? ... seems author will not work anymore in this plugin.... Really appreciate it!

Cheers

dgproductions88 avatar Feb 08 '20 23:02 dgproductions88