Skip to content

Setup integration dependencies before loading it#23957

Merged
rohankapoorcom merged 1 commit into
home-assistant:devfrom
aerialls:dependencies-bug
May 18, 2019
Merged

Setup integration dependencies before loading it#23957
rohankapoorcom merged 1 commit into
home-assistant:devfrom
aerialls:dependencies-bug

Conversation

@aerialls
Copy link
Copy Markdown
Contributor

Description:

The PR is fixing the situation when you are using the check_config script with components using top-level imports (like hue - example here).

The component was loaded before the dependencies were setup. The component cannot be loaded if an import statement from an (yet) unknown package was present.

Related issue (if applicable): fixes #23488

Example entry for configuration.yaml (if applicable):

hue:
$ hass -c . --script check_config
Testing configuration at /Users/aerialls/Projects/ha-dependencies-bug/.
Failed config
  General Errors:
    - Component not found: hue

Successful config (partial)

Checklist:

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

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@aerialls aerialls requested a review from kellerza as a code owner May 17, 2019 22:27
@homeassistant homeassistant added core small-pr PRs with less than 30 lines. cla-signed labels May 17, 2019
@awarecan awarecan added this to the 0.93.2 milestone May 17, 2019
Copy link
Copy Markdown
Contributor

@awarecan awarecan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can be merged after test passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Component not found: hue

5 participants