Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Import Name 'DysonPurifierHumidifyCoolFormaldehyde' #164

Open
shukarCA opened this issue Sep 25, 2022 · 5 comments
Open

Cannot Import Name 'DysonPurifierHumidifyCoolFormaldehyde' #164

shukarCA opened this issue Sep 25, 2022 · 5 comments

Comments

@shukarCA
Copy link

I have recently installed both the Dyson_local and Dyson_cloud integrations on my HASS OS VM, and they were working great until the system rebooted. Now they are both failing to load and giving the following error in the logs:

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

I suspect this is related to my newer Dyson fan, an HP07 Purify Hot+Cool, since I had zero issues previously with my older two Pure Cool Link fans.

Please advise on any additional logs or information required and I can provide as needed.

@bradyemerson
Copy link

I'm having the same issue and no changes to my previously working fan setup, so don't believe this is related to your new Dyson model.

Setup failed for custom integration dyson_cloud: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.10/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.10/site-packages/libdyson/init.py)

@GitPetri
Copy link

Please advise on any additional logs or information required and I can provide as needed.

Probably worth checking which libdyson version(s) you have in your HA. At least some time back Dyson cloud installed older libdyson than Dyson local. See #103 (comment)

@bakteriak
Copy link

bakteriak commented Nov 15, 2022

Thanks, @GitPetri. I was able to install both local and cloud.

I have modified manifest.json

libdyson==0.8.11 originally it was 0.8.7 I think now it matches the version of local.

image

However, got another obstacle. Local was able to pull all information from the cloud, however, when I try to configure local it asks me for the host (I know this should be ignored) and when I press submit I got an unknown error occurred.

image

In the logs, I have found below.

This error originated from a custom integration.

Logger: aiohttp.server Source: custom_components/dyson_local/config_flow.py:246 Integration: Dyson Local (documentation, issues) First occurred: 21:22:09 (3 occurrences) Last logged: 21:23:48

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper result = await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/dyson_local/config_flow.py", line 167, in async_step_host data = await self._async_get_entry_data( File "/config/custom_components/dyson_local/config_flow.py", line 216, in _async_get_entry_data await self._async_try_connect(serial, credential, device_type, host) File "/config/custom_components/dyson_local/config_flow.py", line 246, in _async_try_connect discovery.register_device(device, _callback) File "/usr/local/lib/python3.10/site-packages/libdyson/discovery.py", line 30, in register_device if device.serial in self._discovered: AttributeError: 'NoneType' object has no attribute 'serial'

@MarcusKapun
Copy link

Same issue here

@dotvezz
Copy link

dotvezz commented Mar 14, 2023

Unfortunately this integration is no longer maintained, but I've created a new fork and am actively working on the new Formaldehyde models. Have a look at #185 for more information, and let me know if you have any questions.

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

No branches or pull requests

6 participants