Does anybody have an idea how to realize some kind of “scan_interval” for the template sensors or the integration itself? I don’t need the chatty 30 seconds updates in my database. So of course I could delete the template sensors not really needed (e.g. fan speed), but the main integration will update itself every 30 seconds and I assume that the attributes are also recorded and saved in the the database all the time?
Edit: Okay that was too obvious. Just add scan_interval to the configuration.yaml. It works, even it’s not documented.
I’m not sure how to solve it, but I had already noticed that the Xiaomi purifier has a small issue: it provides status as lowercase (auto, silent, favourite), but accepts status setting using capitals (Auto, Silent, Favorite).
This way when the automations compare the value seti in Lovelace with the value reported from Xiaomi, the two don’t match perfectly due to capitalization.
Or at least this was what I got from the error logs, then I temporarily abandoned the issue because I don’t change settings from Lovelace anyway, but I know they one day I’ll have to find out how to solve the issue.
I won’t have access to my server for a while, but try this: stop HA, go to the folder where HA is installed, look for the components subfolder, then for xiaomi_miio, then edit the file fan.py.
In that file look for the text “Silent” (it appears only in few lines) and replace all occurrences of the uppercase Auto, Silent, Favourite with the lowercase equivalents.
Start HA and see if the fan still works and accept the new statuses. The automations should be adapted to also have everything lowercase.
If it works, the Xiaomi component should be updated. If not, the component needs to implement a case conversion.
Hey guys, i have 2 purifiers a 2s and a pro. I cannot get both of them to work at the same time, if only 1 is added it works, the moment i define the second one, the first goes offline.
i define each as a separate entity, do i need to use
fan:
- platform: xiaomi_miio
name: Air Purifier 1
host: Your IP
token: Your token
- platform: xiaomi_miio
name: Air Purifier 2
host: Your IP
token: Your token
Hey guys! Sorry I didnt receive any mails for this post. They made breaking changes so the names of the services have changed and some buttons were no more working. I updated my initial post so now everythings works again!
What never worked for me is the “Fan speed”. When rebooting hass.io it shows the current value but then never gets updated. Someone has an idea for that?
Yes you can have more than one. I have two. Unfortunately you have to duplicate the configuration but set a different name. I tried to keep mine organized by making comments with #.
And then my devices are named fan.air_purifier_2s_bedroom and fan.air_purifier_2s_living_room. You can find the names developer tools -> entity autocomplete.
Maybe I did something wrong, but when I start the application, the favorite mode’s slider is set to 0 (initial: 0) despite of checking the actual value. Is it possible to query its setting and start with that one?
Is there an interest from your side to read the actual value at start and set the slider to that value? Or is there a difficulty to do this?
I can’t fully agree with you. For me it is continuously updated, although it is a bit slow. It takes 20-30 seconds to update, but when I move the slider, the fan speed indicator follows the reality. So I think it is ok (or I misunderstood something).