Hi. I have a couple of Xiaomi power plugs which use the Xiaomi Miio integration. They have stopped working since this latest release.
The logs say: Error occurred loading configuration flow for integration xiaomi_miio: cannot import name ‘FanZA5’ from ‘miio’ (/usr/local/lib/python3.9/site-packages/miio/init.py)
If I try and remove them they won’t remove. If I try and re-add the integration I get: ## Error
Actually I just managed to fix it. I was also using the Xiaomi Miio for Yeelight integration from HACS. Once I updated that it, the Xiaomi Miio integration also started to work… due to reasons I don’t understand =)
Since Xiaomi branded Yeelights no longer allow for local control, they don’t work with the standard Yeelight integration any more. The only way I found to get around it is to use the HACS integration “Xiaomi Miio for Yeelight” (apparently now there are other ways to do it though…).
My core HA integration Xiaomi Miio was broken until I also updated the HACS one. No idea why.
Hi.
I faced with the same issue, sometimes HA miio works ok, sometimes I got the same error (FanZA5).
I did random actions (change configs, update something or even change lang, restart HA, reboot), sometimes it help.
Also I noted, file /srv/homeassistant/lib/python3.9/site-packages/miio/init.py
had a row:
from miio.fan_miot import Fan1C, FanMiot, FanP9, FanP10, FanP11, FanZA5
but now somehow it have been without ‘FanZA5’:
from miio.fan_miot import Fan1C, FanMiot, FanP9, FanP10, FanP11
If I added ‘, FanZA5’ at the end of the string (row 39) and restart HA, miio started work fine.
Solved:
I checked all manifest.json files regarding miio version dependency. One custom integration have following string:
./.homeassistant/custom_components/miio2/manifest.json: “python-miio==0.5.6”
Just changed it to:
./.homeassistant/custom_components/miio2/manifest.json: “python-miio>=0.5.6”
Also I executed following commands from HA user:
PATH=$PATH:/srv/homeassistant/bin
hass --script check_config #very useful command