Lovelace: Xiaomi - Mi air purifier 3H card

If you would like apply provided fix:
pip3 install --upgrade git+https://github.com/rytilahti/python-miio@airpurifier_miot/fix/aqi_refresh

I will also test it by myself, but it could take a while (right now i have good weather condition and stable 1pm2, so I have flat chart with or without fix)

Unfortunately ended with several errors regarding dependencies etc, i am not sure HASSIO is the best way to test those

Irregardless, it appears a fix is being pushed for next release for the continuous monitoring. Based on the link you posted @Razer, so I will hold off trying manual fixes and just wait for that to surface.

No a fix is not coming

We have to test this to have it fixed

Sorry if I misunderstood, but appears it is being merged into main?

And until the merge happens, he proposed to test it out, specifically on other purifier than the one he owns.

We have to confirm it works, itā€™s as it says ā€œan attempt to fix itā€, @maker3 said he is going to test it soon

EDIT: Not sure what happened, after attempting to test the fix yesterday I am not able to set fan speed anymore :frowning: the entity disappeared

Are you on 2021.12.8? There are loads of issues with the Miio integration. I personally rolled back to 2021.12.7, because I lost the number entities.

And sounds good, I am not going to mess with my standard integrations, I wouldnā€™t even know where to look for the code as I suppose it is hidden for newbies like me.

That could be the problem

Whatā€™s the easiest way to revert back?

I was successful with the following approach:

Configuration ā†’ Add-ons, Backups & Supervisor ā†’ Backups ā†’ I clicked the one called core_2021.12.7 that was prompted to be created when I updated to 12.8.

Then I only checked the first checkmark, and clicked restore:

It didnā€™t give me any confirmation, so just be patient, as it is working in the background. On my Raspberry Pi 4 8GB it took 2-3 minutes before it rebooted.

Yeah i can confirm that was the problem, thanks :slight_smile:

1 Like

Interesting, i donā€™t see any problems on my purifier proā€¦ or am i missing something?

You still got the number entities, like favourite level? And they are not there, but disabled?

Might be specific to certain models.

Anyhow, a fix will be released after the latest release.

Well, i have two xiaomi fan entities:
ā€œfan.mi_air_purifier_proā€ with only 7 attributes (original HA) and
ā€œfan.xiaomi_air_purifier_proā€ with some 26 attributes (IMPROVED version) entity.
All there, nothing disabled or unavailableā€¦favorite level switches ok, all seems to work like beforeā€¦ i can change favorite level (and thus motor speed).
It can be model specific, though, sureā€¦

There are devices and there are entities.

Do you have any working entities starting with number.xxx that are not disabled?

In my case one of them are called: number.bedroom_purifier_favorite_level

AHA! Found it. I have two, one is called ā€œnumber.mi_air_purifier_pro_volumeā€ and other is ā€œnumber.mi_air_purifier_pro_favorite_levelā€. But i never used them, so i donā€™t even know what they are for.
In history first one shows all zeroes, so that one didnā€™t work even before update, but favorite level indeed died with latest update.
What is this sensor for anyway? I get my favorite level state from attribute in ā€œfan.xiaomi_air_purifier_proā€, thatā€™s why all worksā€¦

It is used for reading the current level and selecting another one.

OK, understood, thanks. But, as i said, i use another way to do it and since it works perfectly, iā€™ll just stick with that option.
Thanks for explanation!

1 Like

It seems that this issue has been resolved with latest HA update (12.9), since above two entitites are now ok and ā€œaliveā€ in my HA.

1 Like

Now we just need the PM2.5 value update interval fix to be released.

Hi everyone,

I canā€™t get this card wqorking. Itā€™s also my first card so myabe i didnā€™t understand correctly how it works.

Anyway i copy pasted everything from the secondpost on the start.

  1. Added configuration.yaml. of course with my own host, token informations.
  2. Added to automation.yaml the complete text. Changed all IDā€™ XX with the same 9 digits number
  3. I has no lovelace.yaml. Read somewhere you need first a ui-lovelace.yaml so added first to ui-lovelace.yaml. Secondly renamed to lovelace.yaml. But sadly did it not work.

Is there somewhere a simple step bij step instruction?

1 Like