Support for Xiaomi Mi Air Purifier Pro / Pro H in Xiaomi Miio integration

Hi!

I’d like to request support for the Xiaomi Mi Air Purifier Pro / Pro H (newest version) as it is currently not supported by the Xiaomi Miio integration. The model name of the Pro H is zhimi.airpurifier.vb2. I currently use the ‘model’ option in configuration.yaml and set that to the Purifier 3H (zhimi.airpurifier.mb3) to be able to use the Pro H, but I’m not sure if that unlocks all the available options.

If any information or help is needed, please let me know! I’d be happy to help :slight_smile:

I’m also in the process of buying the Purifier Pro H, but it’s possible to control that device through HA? (so no problems with token extraction and configuring within HA)?

I’ve managed to make it work with configuring the model as ‘zhimi.airpurifier.mb3’ and can confirm that it can be used. But I’m not 100% sure if all available options of the Pro H can be used with this method.

2 Likes

Ah cool. And what’s your experience with this air purifier? How’s the price quality ratio.

Hi Guys, So I have 2 purifies. 3H and Pro H…
3H is working no problem, but Pro H, configured the same way, says that entity is not numeric… Why ?
These are configured as below:

fan:
  - platform: xiaomi_miio_airpurifier
    name: Air Purifier Aga
    host: 192.168.0.20
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    model: zhimi.airpurifier.mb3
    
  - platform: xiaomi_miio_airpurifier
    name: Air Purifier Salon
    host: 192.168.0.10
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    model: zhimi.airpurifier.mb3
And sensors:

  - platform: template
    sensors:
      air_purifier_aga_aqi:
        friendly_name: "Sypialnia PM2.5"
        unit_of_measurement: 'μg/m³'
        value_template: "{{ state_attr('fan.air_purifier_aga', 'aqi') }}"
      air_purifier_salon_aqi:
        friendly_name: "Salon PM2.5"
        unit_of_measurement: 'μg/m³'
        value_template: "{{ state_attr('fan.air_purifier_salon', 'aqi') }}"

Hi,

That’s strange. I use the same setup in my configuration on HA version 2021.1.5:

#Xiaomi Mi Air Purifier Pro H 
fan:
  - platform: xiaomi_miio
    host: <ip address>
    token: <tokenid>
    model: zhimi.airpurifier.mb3

and for sensors:

  - platform: template
    sensors:
      mi_air_purifier_air_quality_pm25:
        friendly_name: "Air quality (AQI) PM2.5"
        value_template: "{{ state_attr('fan.xiaomi_miio_device', 'aqi') }}"
        unit_of_measurement: "μg/m³"
        icon_template: "mdi:weather-fog"
      mi_air_purifier_avg_air_quality_pm25:
        friendly_name: "Average air quality (AvgAQI) PM2.5"
        value_template: "{{ state_attr('fan.xiaomi_miio_device', 'average_aqi') }}"
        unit_of_measurement: "μg/m³"
        icon_template: "mdi:weather-hazy"

However sometimes the connection with the purifier is lost, and then I get empty values which result in an invalid value in the gauge card.

Logger: homeassistant.components.xiaomi_miio.fan 
Source: components/xiaomi_miio/fan.py:849 
Integration: Xiaomi Miio (documentation, issues) 
First occurred: March 16, 2021, 5:51:48 PM (12 occurrences) 
Last logged: 8:54:37 AM 
* Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'} 
* Got exception while fetching the state: Unable to discover the device <ip address>

Try “zhimi.airpurifier.va1” it works for me.
I am in Serbia, using .de cloud server

1 Like

Also, try zhimi.airpurifier.mb3 - that might be better (recommended by a friend)

1 Like

Can confirm I got my Xiaomi Smart Mi Air Purifier Pro H working with Home Assistant with zhimi.airpurifier.mb3

1 Like

Do you have any issues with it? Does it ever disconnect? Is it noisy?
Are there any minor annoyances with the unit and the integration?
What’s the room size you’re using it in and how long does it take to have an effect on the air quality?
Can you effectively run it in low fan speed setting?
Thanks a lot.

Hi all. I confirm zhimi.airpurifier.mb3 profile can be used for a Pro H device, but it doesn’t use 100% Pro H capabilities. I can’t set auto or favourite mode from HA, rest of features can be set without problem.

1 Like

Did you get an answer for this?

I have the same error.

Hello, I am also requestor to have a solution for unsupported model ‘zhimi.airpurifier.vb2’ and have all the Pro H options implemented.
As earlier confirmed the mb3 can be used, but has not all controls available.
Any alternate suggestions to have favorite mode set via HA ?

Any updates on an implementation? would love to automate to set it to night mode when I am going to sleep.

1 Like

can you share the config? I have the pro H, but can’t get it working (using model: zhimi.airpurifier.mb3)

Hi all, is the Xiaomi Smart Air Purifier 4 Pro integratable as well?

1 Like

Could add it! Now learning what to control with HA and maybe config some more things.


1 Like

That’s my great news @legi ! I’m just about to buy Xiaomi Smart Air Purifier 4 Pro, which model did you use when configuring your integration please?

Yeah same question here. My handle of the Air Purifier Pro 4 is " zhimi.airp.vb4" when using an app to get the tokens, but it seemingly does not work out of the box.

I have successfully integrated it with GitHub - al-one/hass-xiaomi-miot: Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices.