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

Fix demo #23087

Merged
merged 6 commits into from
Apr 14, 2019
Merged

Fix demo #23087

merged 6 commits into from
Apr 14, 2019

Conversation

balloob
Copy link
Member

@balloob balloob commented Apr 14, 2019

Description:

  • Discovery now requires hass_config to be passed in
  • async_setup_component now requires config to be passed in
  • Fixes the demo tests.
  • Fixes an issue where loading the scene integration would result in the integration component being set up twice.
  • Demo compnent will only load when explicitly mentioned in the config, won't set itself up as part of setting up a demo platform.
  • Remove groups from demo
  • Loading the demo integration will no longer interfere with other integrations that are being set up, as we no longer call async_setup_component during our own async_setup, but use platform discovery instead.

Related issue (if applicable): fixes #23003

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

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 user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly (example).
  • New dependencies have been added to requirements in the manifest (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

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

@github-actions
Copy link

Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration (demo) you are listed as a codeowner for? Thanks!

@codecov
Copy link

codecov bot commented Apr 14, 2019

Codecov Report

Merging #23087 into dev will decrease coverage by 32.17%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##              dev   #23087       +/-   ##
===========================================
- Coverage   93.95%   61.77%   -32.18%     
===========================================
  Files         452      452               
  Lines       36798    36789        -9     
===========================================
- Hits        34572    22725    -11847     
- Misses       2226    14064    +11838
Impacted Files Coverage Δ
homeassistant/loader.py 83.01% <ø> (-10.85%) ⬇️
homeassistant/helpers/discovery.py 89.47% <ø> (-10.53%) ⬇️
homeassistant/helpers/entity_component.py 93.98% <ø> (-2.26%) ⬇️
homeassistant/bootstrap.py 59.25% <0%> (+0.47%) ⬆️
homeassistant/components/automation/template.py 0% <0%> (-100%) ⬇️
homeassistant/components/litejet/switch.py 0% <0%> (-100%) ⬇️
homeassistant/components/automation/state.py 0% <0%> (-100%) ⬇️
homeassistant/components/worldclock/sensor.py 0% <0%> (-100%) ⬇️
...omeassistant/components/logi_circle/config_flow.py 0% <0%> (-100%) ⬇️
homeassistant/components/smhi/weather.py 0% <0%> (-100%) ⬇️
... and 214 more

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 3368e30...ec4fa3d. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 14, 2019

Codecov Report

Merging #23087 into dev will increase coverage by 0.14%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #23087      +/-   ##
==========================================
+ Coverage   93.95%   94.09%   +0.14%     
==========================================
  Files         452      452              
  Lines       36798    36789       -9     
==========================================
+ Hits        34572    34617      +45     
+ Misses       2226     2172      -54
Impacted Files Coverage Δ
homeassistant/loader.py 93.86% <ø> (ø) ⬆️
homeassistant/helpers/discovery.py 100% <ø> (ø) ⬆️
homeassistant/helpers/entity_component.py 96.24% <ø> (ø) ⬆️
homeassistant/bootstrap.py 59.25% <0%> (+0.47%) ⬆️
setup.py 86.5% <0%> (-0.33%) ⬇️
...assistant/components/manual/alarm_control_panel.py 98.74% <0%> (+0.62%) ⬆️
homeassistant/components/demo/device_tracker.py 100% <0%> (+78.57%) ⬆️
homeassistant/components/demo/sensor.py 100% <0%> (+100%) ⬆️
homeassistant/components/demo/binary_sensor.py 100% <0%> (+100%) ⬆️

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 3368e30...074da0b. Read the comment docs.

@balloob balloob merged commit 6b0180f into dev Apr 14, 2019
@ghost ghost removed the in progress label Apr 14, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-demo-setup branch April 14, 2019 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading demo platforms result in deadlock
2 participants