barban-dev / homeassistant-midea-dehumidifier

Home Assistant Custom Integration for EVA II PRO WiFi Smart Dehumidifier appliance by Midea/Inventor.
GNU General Public License v3.0
82 stars 28 forks source link

MDDF-20DEN7-WF causes platform not found #74

Closed Tockra closed 3 months ago

Tockra commented 4 months ago

Hi,

I connected my MDDF-20DEN7-WF device with the INVmate II app. Then I connected the account with the HACS HA integration. After a restart I receive following logs:

Logger: homeassistant.setup
Quelle: setup.py:485
Erstmals aufgetreten: 11:59:43 (2 Vorkommnisse)
Zuletzt protokolliert: 11:59:43

Unable to prepare setup for platform 'midea_dehumidifier.humidifier': Platform not found (Exception importing custom_components.midea_dehumidifier.humidifier).
Unable to prepare setup for platform 'midea_dehumidifier.sensor': Platform not found (Exception importing custom_components.midea_dehumidifier.sensor).

Logger: homeassistant.loader
Quelle: loader.py:1247
Erstmals aufgetreten: 11:59:43 (4 Vorkommnisse)
Zuletzt protokolliert: 11:59:43

Unexpected exception importing platform custom_components.midea_dehumidifier.humidifier
Unexpected exception importing platform custom_components.midea_dehumidifier.sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1247, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1279, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 991, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1129, in get_code
  File "<frozen importlib._bootstrap_external>", line 1059, in source_to_code
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/midea_dehumidifier/humidifier.py", line 187
        self._device_class = HumidifierDeviceClass.DEHUMIDIFIER
    ^
TabError: inconsistent use of tabs and spaces in indentation
Logger: homeassistant.util.loop
Quelle: util/loop.py:77
Erstmals aufgetreten: 12:19:48 (1 Vorkommnisse)
Zuletzt protokolliert: 12:19:48

Detected blocking call to import_module with args ('custom_components.midea_dehumidifier.humidifier',) in /usr/src/homeassistant/homeassistant/loader.py, line 1279: return importlib.import_module(f"{self.pkg_path}.{platform_name}") inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in _async_component_platform_discovered await self.async_setup_platform(platform, {}, info) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 298, in async_setup_platform platform = await async_prepare_setup_platform( File "/usr/src/homeassistant/homeassistant/setup.py", line 526, in async_prepare_setup_platform platform = await integration.async_get_platform(domain) File "/usr/src/homeassistant/homeassistant/loader.py", line 1083, in async_get_platform platforms = await self.async_get_platforms((platform_name,)) File "/usr/src/homeassistant/homeassistant/loader.py", line 1148, in async_get_platforms platforms.update(self._load_platforms(platform_names)) File "/usr/src/homeassistant/homeassistant/loader.py", line 1073, in _load_platforms platform_name: self._load_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 1247, in _load_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 1279, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}")
Tockra commented 3 months ago

For all who have the same problem: The solution was to remove the integration and install it again. But NOT with the tagged version. I choosed "master". That worked.