Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Unable to import component: cannot import name 'SUPPORT_SET_SPEED' #101

Open
nechry opened this issue Jan 4, 2025 · 1 comment
Open

Comments

@nechry
Copy link

nechry commented Jan 4, 2025

With HA core on version 2025.1.0

Setup failed for custom integration 'miio_yeelink': Unable to import component: cannot import name 'SUPPORT_SET_SPEED' from 'homeassistant.components.fan'

(/usr/src/homeassistant/homeassistant/components/fan/__init__.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1015, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self._get_component, True
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, 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 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/miio_yeelink/__init__.py", line 29, in <module>
    from homeassistant.components.fan import (
    ...<6 lines>...
    )

ImportError: cannot import name 'SUPPORT_SET_SPEED' from 'homeassistant.components.fan' (/usr/src/homeassistant/homeassistant/components/fan/init.py)

During handling of the above exception, another exception occurred:
ImportError: cannot import name 'SUPPORT_SET_SPEED' from 'homeassistant.components.fan' (/usr/src/homeassistant/homeassistant/components/fan/init.py)

thank-you for your help

@siaua
Copy link

siaua commented Jan 6, 2025

Same thing after updating to HA core on version 2025.1.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants