1
0
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:
J. Nick Koston
2024-03-02 17:14:28 -10:00
committed by GitHub
parent a253991c6d
commit c8cb0ff61d
9 changed files with 135 additions and 16 deletions

View File

@@ -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

View File

@@ -0,0 +1,7 @@
"""Config flow."""
from homeassistant.core import HomeAssistant
async def _async_has_devices(hass: HomeAssistant) -> bool:
return True

View File

@@ -0,0 +1,2 @@
"""Constants for test_package custom component."""
TEST = 5

View File

@@ -0,0 +1,3 @@
"""Group."""
MAGIC = 1

View File

@@ -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"
}