Closed jahnkenneth closed 1 year ago
I have the same error ("invalid handler specified" when trying to configure Dyson Cloud)
Logfile says
ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration dyson_cloud: cannot import name 'DysonPurifierHumidifyCool' from 'libdyson' (/usr/local/lib/python3.10/site-packages/libdyson/__init__.py)
Same as @MHohenberg
I am someone trying to migrate from shenxn
, so am guessing I have a bad reference saved in my configuration after attempting to delete all of that. I have tried many procedures, with the most recent being:
shenxn
integrations from HACS, then replacing the custom repositories with new onesVery interesting. @NickBorgers I think you may be onto something. The log entry from @MHohenberg That error message would only happen if you're using the old version of libdyson. I wonder if Home Assistant didn't properly remove the old libdyson before installing libdyson-neon (they would both have the same libdyson
import path).
For anyone having that error message, can you confirm if the following steps get you cleared up?
I went one step farther in restarts:
/config/integrations
Okay, know what, enough people have been dealing with this kind of error that I'm going to change the way the integration uses libdyson. I'll cut a new release soon that vendors the library instead of relying on Home Assistant's venv.
If that doesn't fix the problem, I'll eat my pants.
@NickBorgers and @MHohenberg (as well as anyone else facing "invalid handler specified" or import errors): I've cut new releases of this and the cloud integration which vendor the libdyson dependency. Feel free to upgrade and let me know if it helps!
https://github.com/libdyson-wg/ha-dyson/releases/tag/v0.20.0 https://github.com/libdyson-wg/ha-dyson-cloud/releases/tag/v0.19.0
Unfortunately still getting Config flow could not be loaded: {"message":"Invalid handler specified"}
in version 0.19.0 of ha-dyson-cloud.
That's gotta be frustrating. Sorry to bother you for this, but would you be able to set up debug logging (as described in the readme) and share the logs related to Dyson?
I released https://github.com/libdyson-wg/ha-dyson-cloud/releases/tag/v0.19.1 which fixes a bug - I don't think it's related to your problem but feel free to update and try it out.
@dotvezz After your updates I was able to successfully execute the no-reconfig flow suggested here.
Thank you!
@dotvezz Finally found some time to set it up. Initially kept getting the same message but forgot to install the Local package first. After doing that the latest version works for me too, thanks!
@jahnkenneth Just wanted to check and see if your issue was resolved as well.
Edit: I forgot to re-install libdyson-wg/ha-dyson as well. The fix actually worked for me - thank you!
I'm not jahnkenneth, but I am having the same issue and installing v0.19.1 ~did not~ dit fix it. This is what I ended up doing to resolve the resolve the issue:
dyson_cloud
and dyson_local
custom_components
sub-directoriesIn case anyone runs into the same issue that I did (see "edit" above), here is what happened. My first attempt at this failed with the same error as the OP because I forgot to re-install the dyson_local
integration. I was able to diagnose this because I found this message in the home-assistant logs:
2023-06-11 09:47:53.935 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration dyson_cloud: No module named 'custom_components.dyson_local'
In case it is helpful to others: I made this mistake because I got confused about two aspects of how this integration works. First, I did not roealize that ha-dyson-cloud internally depends on ha-dyson. Second, I wasn't sure how the names in the HACS and HAAS UIs mapped onto these two repositories.
For the latter point, I made this table to clarify my own understanding. Hopefully it is useful to someone else too:
Github Repository | HACS UI | HAAS Component | HAAS UI |
---|---|---|---|
libdyson-wg/ha-dyson | Dyson Integration | dyson_local | Dyson Local |
libdyson-wg/ha-dyson-cloud | Dyson Cloud Integration | dyson_cloud | Dyson Cloud |
FWIW I personally think it would be clearer if (1) both integrations were in the same repository; (2) ha-dyson was called ha-dyson-local
in HACS and (3) "Dyson Local" in HAAS; and (4) the HACS names dropped the work "Integration." Please just interpret this as constructive feedback - I really appreciate all the work you've put into creating and supporting these integrations!
FWIW I personally think it would be clearer if (1) both integrations were in the same repository . . .
I actually completely agree with the single-repository approach. Several years ago, before I adopted the repositories from shenxn, they were split up. I don't know the reasoning because I wasn't there at the time, and the commit history isn't super clear, but I'm guessing it came down to wanting to let most of the functionality be provided by a privacy-focused codebase.
Now though, especially as recently released devices require using the Dyson API in order to obtain MQTT credentials, keeping them separate doesn't seem to make as much sense. I've been entertaining the idea of merging them, but for the time being I'm focusing on overhauling the underlying architecture and improving reliability.
Ergonomics of installation and configuration will be a much bigger concern once I've finished the Reliability/QOL overhaul.
https://github.com/libdyson-wg/ha-dyson/discussions/49 There's a poll for whether or not to combine the two repositories, feel free to go vote!
@mkoval: There's a new Beta release which combines the Cloud and Local functionality: v1.0.0-beta.
If you would like to test it and/or provide feedback, that would be great!
Installed the Beta, and all seems ok.
Do I now remove the separate "Dyson Cloud" add-on?
@iculookn glad it's working! It provides all the features of Dyson Cloud (although you'll have to log in again) so technically the Cloud integration isn't hurting anything.
You should be good to delete it! Although it might make sense to wait for a stable release of v1.0.0 (soon!) before doing that.
Hi, I am unable to add devices.