Skip to content

Fix empty components not having DOMAIN#23177

Merged
awarecan merged 1 commit intodevfrom
fix-empty-components
Apr 18, 2019
Merged

Fix empty components not having DOMAIN#23177
awarecan merged 1 commit intodevfrom
fix-empty-components

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Apr 17, 2019

Description:

When a platform is loaded, we will now always load the component. We incorrectly assumed that when we load the component, there was a DOMAIN constant.

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.

If the code does not interact with devices:

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

@balloob balloob added this to the 0.92.0 milestone Apr 17, 2019
@balloob balloob requested a review from a team as a code owner April 17, 2019 21:58
@homeassistant homeassistant added cla-signed core small-pr PRs with less than 30 lines. labels Apr 17, 2019
Comment thread tests/common.py
"""Generate a mock manifest to represent this module."""
return {
**loader.manifest_from_legacy_module(self),
**loader.manifest_from_legacy_module(self.DOMAIN, self),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why legacy_module?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it's generating a manifest from a Python module. The new approach for integrations is that manifests are their own file.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2019

Codecov Report

Merging #23177 into dev will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #23177      +/-   ##
==========================================
- Coverage   94.19%   94.19%   -0.01%     
==========================================
  Files         453      453              
  Lines       36915    36915              
==========================================
- Hits        34773    34772       -1     
- Misses       2142     2143       +1
Impacted Files Coverage Δ
homeassistant/loader.py 93.87% <100%> (ø) ⬆️
homeassistant/components/uk_transport/sensor.py 93.43% <0%> (-0.73%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6349a6...da98fa3. Read the comment docs.

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.

3 participants