Closed jason0x43 closed 4 years ago
Hey there @home-assistant/core, mind taking a look at this issue as its been labeled with a integration (device_automation
) you are listed as a codeowner for? Thanks!
Yeah what is happening here is that we assume that we can load any integration because the user has configured a device automation for it. However, when you upgrade, the image is new and it might still need to install dependencies for custom integrations.
We should use your proposed function, do you want to open a PR? We should also include caching in async_get_integration_with_requirements
to make sure that we don't check integrations twice.
Sure, I'll work on a PR.
The problem
I wrote a hubitat integration. Sometimes after updating Home Assistant, I'll get a notification in the HA UI that there was a problem with the automation integration (jason0x43/hacs-hubitat#29). From my logs, it looks like:
If I restart HA again, everything works fine.
It's entirely possible I missed something in the init code for my integration. However, it looks like there may also be a problem in the
device_automation
integration: it usesloader.async_get_integration
rather thanrequirements.async_get_integration_with_requirements
, so it won't wait for required packages to be loaded for custom integrations.Environment
Problem-relevant
configuration.yaml
Both the hubitat integration and device_automation are configured via the UI.
Traceback/Error logs
This is a startup log from just after I installed HA 0.107.2. HA starts installing the hubitatmaker dependency at line 36, has problems loading the hubitat integration for device_automation at line 57, and eventually loads the hubitat integration at line 170.
Additional information