diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index cf3637a4473..72acb0fd785 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -50,7 +50,6 @@ STAGE_1_INTEGRATIONS = { # as possible so problem integrations can # be removed "frontend", - "config", } diff --git a/homeassistant/components/default_config/manifest.json b/homeassistant/components/default_config/manifest.json index 0b80e172904..338aeb2e285 100644 --- a/homeassistant/components/default_config/manifest.json +++ b/homeassistant/components/default_config/manifest.json @@ -5,7 +5,6 @@ "dependencies": [ "automation", "cloud", - "config", "frontend", "history", "logbook", diff --git a/homeassistant/components/frontend/manifest.json b/homeassistant/components/frontend/manifest.json index 682c3e9b62f..a1961da4808 100644 --- a/homeassistant/components/frontend/manifest.json +++ b/homeassistant/components/frontend/manifest.json @@ -6,6 +6,7 @@ "dependencies": [ "api", "auth", + "config", "device_automation", "http", "lovelace", diff --git a/homeassistant/components/safe_mode/manifest.json b/homeassistant/components/safe_mode/manifest.json index 6da29c94790..78a656511bd 100644 --- a/homeassistant/components/safe_mode/manifest.json +++ b/homeassistant/components/safe_mode/manifest.json @@ -3,6 +3,6 @@ "name": "Safe Mode", "config_flow": false, "documentation": "https://www.home-assistant.io/integrations/safe_mode", - "dependencies": ["frontend", "config", "persistent_notification", "cloud"], + "dependencies": ["frontend", "persistent_notification", "cloud"], "codeowners": ["@home-assistant/core"] } diff --git a/homeassistant/helpers/discovery.py b/homeassistant/helpers/discovery.py index 11663672bb2..e86638ac02a 100644 --- a/homeassistant/helpers/discovery.py +++ b/homeassistant/helpers/discovery.py @@ -9,9 +9,8 @@ from typing import Any, Callable, Collection, Dict, Optional, Union from homeassistant import core, setup from homeassistant.const import ATTR_DISCOVERED, ATTR_SERVICE, EVENT_PLATFORM_DISCOVERED -from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType -from homeassistant.loader import DEPENDENCY_BLACKLIST, bind_hass +from homeassistant.loader import bind_hass from homeassistant.util.async_ import run_callback_threadsafe EVENT_LOAD_PLATFORM = "load_platform.{}" @@ -79,9 +78,6 @@ async def async_discover( hass_config: ConfigType, ) -> None: """Fire discovery event. Can ensure a component is loaded.""" - if component in DEPENDENCY_BLACKLIST: - raise HomeAssistantError(f"Cannot discover the {component} component.") - if component is not None and component not in hass.config.components: await setup.async_setup_component(hass, component, hass_config) @@ -181,9 +177,6 @@ async def async_load_platform( """ assert hass_config, "You need to pass in the real hass config" - if component in DEPENDENCY_BLACKLIST: - raise HomeAssistantError(f"Cannot discover the {component} component.") - setup_success = True if component not in hass.config.components: diff --git a/homeassistant/loader.py b/homeassistant/loader.py index ed5545b3c28..46db5c232d8 100644 --- a/homeassistant/loader.py +++ b/homeassistant/loader.py @@ -31,8 +31,6 @@ if TYPE_CHECKING: CALLABLE_T = TypeVar("CALLABLE_T", bound=Callable) # pylint: disable=invalid-name -DEPENDENCY_BLACKLIST = {"config"} - _LOGGER = logging.getLogger(__name__) DATA_COMPONENTS = "components" diff --git a/homeassistant/setup.py b/homeassistant/setup.py index 67d9200df61..8ea249756f3 100644 --- a/homeassistant/setup.py +++ b/homeassistant/setup.py @@ -59,17 +59,6 @@ async def _async_process_dependencies( hass: core.HomeAssistant, config: ConfigType, name: str, dependencies: List[str] ) -> bool: """Ensure all dependencies are set up.""" - blacklisted = [dep for dep in dependencies if dep in loader.DEPENDENCY_BLACKLIST] - - if blacklisted and name not in ("default_config", "safe_mode"): - _LOGGER.error( - "Unable to set up dependencies of %s: " - "found blacklisted dependencies: %s", - name, - ", ".join(blacklisted), - ) - return False - tasks = [async_setup_component(hass, dep, config) for dep in dependencies] if not tasks: diff --git a/tests/helpers/test_discovery.py b/tests/helpers/test_discovery.py index 3b0996d676a..64f39fb13bd 100644 --- a/tests/helpers/test_discovery.py +++ b/tests/helpers/test_discovery.py @@ -1,11 +1,8 @@ """Test discovery helpers.""" from unittest.mock import patch -import pytest - from homeassistant import setup from homeassistant.core import callback -from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import discovery from tests.common import ( @@ -216,15 +213,3 @@ class TestHelpersDiscovery: # test_component will only be setup once assert len(component_calls) == 1 - - -async def test_load_platform_forbids_config(): - """Test you cannot setup config component with load_platform.""" - with pytest.raises(HomeAssistantError): - await discovery.async_load_platform(None, "config", "zwave", {}, {"config": {}}) - - -async def test_discover_forbids_config(): - """Test you cannot setup config component with load_platform.""" - with pytest.raises(HomeAssistantError): - await discovery.async_discover(None, None, None, "config", {})