mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Avoid trying to import platforms that do not exist (#112028)
* Avoid trying to import platforms that do not exist * adjust * fixes * cleanup * cleanup * cleanup * Apply suggestions from code review * docs * fixes * fixes * comment * coverage * coverage * coverage * Switch config to use async_get_component This was another path where integrations that were marked to load in the executor would be loaded in the loop * Switch config to use async_get_component/async_get_platform This was another path where integrations that were marked to load in the executor would be loaded in the loop * merge * refactor * refactor * coverage * preen * preen
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
"""Provide a mock package component."""
|
||||
from .const import TEST # noqa: F401
|
||||
|
||||
DOMAIN = "test_integration_platform"
|
||||
|
||||
|
||||
async def async_setup(hass, config):
|
||||
"""Mock a successful setup."""
|
||||
return True
|
||||
@@ -0,0 +1,7 @@
|
||||
"""Config flow."""
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
|
||||
async def _async_has_devices(hass: HomeAssistant) -> bool:
|
||||
return True
|
||||
@@ -0,0 +1,2 @@
|
||||
"""Constants for test_package custom component."""
|
||||
TEST = 5
|
||||
@@ -0,0 +1,3 @@
|
||||
"""Group."""
|
||||
|
||||
MAGIC = 1
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"domain": "test_integration_platform",
|
||||
"name": "Test Integration Platform",
|
||||
"documentation": "http://test-package.io",
|
||||
"requirements": [],
|
||||
"dependencies": [],
|
||||
"codeowners": [],
|
||||
"config_flow": true,
|
||||
"import_executor": true,
|
||||
"version": "1.2.3"
|
||||
}
|
||||
Reference in New Issue
Block a user