shenxn / ha-dyson

HomeAssitant custom integration for dyson
MIT License
307 stars 59 forks source link

ha-dyson failing with "cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson'" #192

Open aburow opened 1 year ago

aburow commented 1 year ago

Logger: homeassistant.setup Source: setup.py:215 First occurred: 12:27:43 PM (2 occurrences) Last logged: 12:27:47 PM

Setup failed for custom integration dyson_cloud: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.11/site-packages/libdyson/init.py) Setup failed for custom integration dyson_local: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.11/site-packages/libdyson/init.py)

rickitoy commented 1 year ago

Getting the same error here and failing to load

This error originated from a custom integration.

Logger: homeassistant.setup Source: custom_components/dyson_local/init.py:9 Integration: dyson_local (documentation, issues) First occurred: 5:13:25 AM (1 occurrences) Last logged: 5:13:25 AM

Setup failed for custom integration dyson_cloud: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.11/site-packages/libdyson/init.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 215, in _async_setup_component component = integration.get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 813, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/dyson_cloud/init.py", line 20, in from custom_components.dyson_local import DOMAIN as DYSON_LOCAL_DOMAIN File "/config/custom_components/dyson_local/init.py", line 9, in from libdyson import ( ImportError: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.11/site-packages/libdyson/init.py)

rickitoy commented 1 year ago

I have fixed this issue by removing this integration and installing the custom one below. https://github.com/libdyson-wg/ha-dyson

Also benefits from local control only

dotvezz commented 1 year ago

I'm the maintainer of the libdyson-wg projects. @rickitoy glad it's working for you!

@aburow were you able to get it working by updating to the latest version of https://github.com/libdyson-wg/ha-dyson?