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

Install requirements for integrations in packages before importing them. #25005

Merged
merged 2 commits into from
Jul 7, 2019
Merged

Install requirements for integrations in packages before importing them. #25005

merged 2 commits into from
Jul 7, 2019

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Jul 7, 2019

Description:

This change will install the requirements of integrations (if any) before trying to import it.

If the integration import has imports from external packages in the top (not in a function/method) you will get this error on config_check and startup if the configuration for that integration is in a package instead of directly in configuration,yaml:

Package package_name setup failed. Component integration_name does not exist

Related issue (if applicable): fixes #24954 fixes #24720

There is also an issue with Yellight could not find a related issue for it but it was reported in #devs_general

After the move to manifest.json for requirements, more and more integrations will start to get this issue as well.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
    Travis and CircleCI passed in my fork.
  • There is no commented out code in this PR.
  • I have followed the development checklist

@ludeeus ludeeus requested a review from a team as a code owner July 7, 2019 08:38
@homeassistant homeassistant added core cla-signed small-pr PRs with less than 30 lines. labels Jul 7, 2019
@Kane610
Copy link
Member

Kane610 commented Jul 7, 2019

I think this might solve the unifi device tracker issue as well. It works if a config entry exists but else it will fail with a similar message

@balloob balloob merged commit df4caf4 into home-assistant:dev Jul 7, 2019
@ludeeus ludeeus deleted the package_loading branch July 7, 2019 19:08
@lock lock bot locked and limited conversation to collaborators Jul 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed core small-pr PRs with less than 30 lines.
Projects
None yet
4 participants