I had a Xiaomi fan/purifier manually configured with the miio platform. With the 2021.4.1 update this is supposed to be configurable via the UI and automatically migrated. Unfortunately, I can’t load the UI configuration for the Xiaomi Miio integration. It errors out with a “Config flow could not be loaded”. The core logs have this:
2021-04-09 13:06:44 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration xiaomi_miio: No module named 'miio.gateway.gateway'; 'miio.gateway' is not a package
2021-04-09 13:06:44 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 573, in async_create_flow
integration.get_platform("config_flow")
File "/usr/src/homeassistant/homeassistant/loader.py", line 485, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/__init__.py", line 5, in <module>
from miio.gateway.gateway import GatewayException
ModuleNotFoundError: No module named 'miio.gateway.gateway'; 'miio.gateway' is not a package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 120, in async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 580, in async_create_flow
raise data_entry_flow.UnknownHandler
homeassistant.data_entry_flow.UnknownHandler
Anyone else seeing this? Any idea how to fix this?