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
KJonline pushed a commit to Rendili/home-assistant that referenced this pull request Jul 8, 2019
… into hive_water_heater

* 'hive_water_heater' of github.com:Rendili/home-assistant: (21 commits)
  Sensibo, add HVAC_MODE_OFF (home-assistant#25016)
  Add support for arcam fmj receivers (home-assistant#24621)
  Enphase envoy individual inverter production (home-assistant#24445)
  Implement Twilio SMS notify MediaUrl support (home-assistant#24971)
  Climate 1.0 (home-assistant#23899)
  Correct socket use in cert_expiry platform (home-assistant#25011)
  Added missing yeelight models mapping (home-assistant#24963)
  Install requirements for integrations in packages before importing them. (home-assistant#25005)
  Upgrade insteonplm to 0.16.0 and add INSTEON scene triggering (home-assistant#24765)
  Upgrade hdate==0.8.8 (home-assistant#25008)
  upgrade switchmate to latest lib (home-assistant#25006)
  Test dependency updates (home-assistant#25004)
  Add support for aurora ABB Powerone solar photovoltaic inverter (home-assistant#24809)
  Sleepiq single sleeper crash (home-assistant#24941)
  Changes as per code review of home-assistant#24646 (home-assistant#24917)
  Upgrade mypy to 0.711, drop no longer needed workarounds (home-assistant#24998)
  Adds Stale Probot for issues (home-assistant#24985)
  Adds Lock Threads Probot (home-assistant#24984)
  Switched from tuyapy to tuyaha as 1st one is not maintained (home-assistant#24821)
  Fix errors if rest source becomes unavailable (home-assistant#24986)
  ...

# Conflicts:
#	homeassistant/components/hive/__init__.py
#	homeassistant/components/hive/climate.py
@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