Mi Smart Pedestal Fan

Is this fan https://www.gearbest.com/air-cooler-fan/pp_009162364641.html is supported by custom component?

I would say probably that it is.
I have two models:

  • one from last year (a Xiaomi Mijia fan (zhimi.fan.sa1), with no battery
  • one from this year (a smartmi S2 (zhimi.fan.za4), has battery
    Both work OK

In the mi home app miio2.db file from which you must extract the API key for the fan they are called this:

|zhimi.fan.za4|Smartmi Standing Fan 2S|
|zhimi.fan.sa1|Mi Standing Fan|

If you obtain the miio2.db file you can find the code name of your fan and check against the component.

1 Like

@hijinx Does your Smartmi Standing Fan 2S work?

I get only:

2019-07-10 20:10:18 INFO (MainThread) [homeassistant.components.xiaomi_miio.fan] Initializing with host X.X.X.X (token XXXXX...)
2019-07-10 20:10:18 INFO (MainThread) [homeassistant.components.xiaomi_miio.fan] zhimi.fan.za4 2.0.5 esp32 detected
2019-07-10 20:10:18 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_airpurifier/issues and provide the following data: zhimi.fan.za4
2019-07-10 20:10:18 INFO (MainThread) [homeassistant.setup] Setup of domain fan took 0.4 seconds.

Yes the S2 works for me: (see zhimi.fan.za4 model in the details)

Are you running latest version of the component?
@syssi updated it quite recently.

Works now, thanks :-). I forgot to change the name of the component…Silly me.

I was wondering is there any change to get the battery state/charge?

Good question. Tbh I didn’t see those attributes were null.
I guess that the component needs some change for thus model, or that this model does not report those attributes…

Big thanks for this custom component, my Xiaomi Smart Fan 2S works fine with Home Assistant now.

I have some suggestions to make it even better.

  • adding a switch to change between “direct speed” and “natural speed”.
  • add a slider to set the speed on a scale between 0-100, as is possible in the Xiaomi app
  • button to change between the angles (off, 30, 60, 90 and 120 degrees)

Not sure if this is possible by making a custom card with buttons with actions, something for me to dig into this holiday.

hi how does the fan.xiaomi_miio_set_oscillation_angle service work?
what service data can I put there?

1 Like

Unfortunately, this is the dmaker.fan.p5 model, which is not supported by the component :frowning:

The backend library has suppotr for this:

Yes, I know. I used develop version of the library and added some modification to the component and it’s works.

If someone want to try: https://github.com/bieniu/xiaomi_fan

2 Likes

Hi! Thanks for the awesome component, i have the, (zhimi.fan.za4) and got some questions. I use homekit, and get the fan in there perfectly fine. However, if i change the speed in hass or xiaomi app, it doesnt update in homekit. I also dont have stepless values in homekit, as i have in the xiaomi app. Is this possible to add in some way? If i put the percentage to 20% in homekit, it sets itself to 1% in xiaomi. If i put it to 30% it sets itself to 25% etc.

Is this possible to fix in some way?

Again, thanks! /Juno

I just got hold of a zhimi.fan.za4 (2S with battery). The fan works in Hass. Battery level is however not reported. It is not reported either in the Mi Home app…

Is there a way to get this info through this component as it does for the zhimi.fan.v3?

If anyone is like me and blocked internet traffic from the Fan:
Make sure to allow DNS traffic and just deny the rest. My fan was constantly losing connection to home-assistant. After I allowed dns traffic it hasn’t dropped connection once.

2 Likes

Hej Bieniu, can you advise how to install this. I am running hassio on PI4. Thanks in advance.

Look at readme file: https://github.com/bieniu/xiaomi_fan#xiaomi-mi-smart-pedestal-fan

I have the same fan, but the spi flash is damaged. Can you please download the firmware by creating a hotspot and using wireshark to capture packets(When Mi Home shows that the fan could upgrade the firmware)?

I have another fan of zhimi.fan.v3, but the circuit is different from v2.

Many thanks.

Hi guys, thanks for the introduction to syss/xiaomi_fan.
I manage to get the “zhimi.fan.sa1” fan integration working.
Any chance it will be extended to support the new xiaomi ceiling fan? The model seems to be “yeelink.light.fancl1”

After setting up the smartfi fan I’d recommend not to support Xiaomi as they’re intentionally and without any benefit making it hard for people to integrate their hardware into open systems like homeassistiant. There is no need for pairing over their could or for changing that token on every change.

I cannot install HACS after updated Home Assistant to 0.110 release !

I got an error at the configuration step https://hacs.xyz/docs/configuration/basic

It’s loading 2 minutes and in log i can see this error.

Please help