rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.64k stars 550 forks source link

Unsupported device Xiaomi Smart Air Purifier 4 (zhimi.airp.mb5a) #1523

Closed Som83 closed 1 year ago

Som83 commented 1 year ago

Device information:

Work fine with either "--model zhimi.airp.mb5" or "--model zhimi.airp.va2" except for 'set_led_brightness bright'. Backlight just switch off insted of lighting bright. 'Dim' and 'Off' work as intended.

>miiocli airpurifiermiot --model zhimi.airp.mb5 --ip 172.16.0.199 --token **** status
Power: on
Anion: True
AQI: 3 μg/m³
TVOC: None
Average AQI: 6 μg/m³
Humidity: 62 %
Temperature: 19.3 °C
PM10 Density: None μg/m³
Fan Level: 1
Mode: OperationMode.Auto
LED: None
LED brightness: LedBrightness.Dim
LED brightness level: None
Gestures: None
Buzzer: False
Buzzer vol.: None
Child lock: False
Favorite level: 11
Filter life remaining: 73 %
Filter hours used: 1947
Filter left time: 210 days
Use time: None s
Purify volume: 97365 m³
Motor speed: 447 rpm
Filter RFID product id: 0:0:32:36
Filter RFID tag: 81:73:bb:f2:73:54:4
Filter type: FilterType.Regular
rytilahti commented 1 year ago

Thanks for the report! You could try to add your model to this list (and adjust the status container to fix the reporting) to see if that fixes the issue: https://github.com/rytilahti/python-miio/blob/master/miio/integrations/airpurifier/zhimi/airpurifier_miot.py#L693

If you wish, feel free to create a PR to adjust the file (the mapping, the led brightness pieces)!