diff --git a/homeassistant/components/homeassistant/strings.json b/homeassistant/components/homeassistant/strings.json index 06ecd4fe3ef..55a40e7ba9d 100644 --- a/homeassistant/components/homeassistant/strings.json +++ b/homeassistant/components/homeassistant/strings.json @@ -11,6 +11,10 @@ "python_version": { "title": "Support for Python {current_python_version} is being removed", "description": "Support for running Home Assistant in the current used Python version {current_python_version} is deprecated and will be removed in Home Assistant {breaks_in_ha_version}. Please upgrade Python to {required_python_version} to prevent your Home Assistant instance from breaking." + }, + "integration_key_no_support": { + "title": "This integration does not support YAML configuration", + "description": "The {domain} integration does not support configuration via YAML file. You may not notice any obvious issues with the integration, but the configuration settings defined in YAML are not actually applied. \n\nTo resolve this: 1. Please remove this integration from your YAML configuration file.\n\n2. Restart Home Assistant." } }, "system_health": { diff --git a/homeassistant/setup.py b/homeassistant/setup.py index f0a44eaeece..3c808033abe 100644 --- a/homeassistant/setup.py +++ b/homeassistant/setup.py @@ -18,8 +18,9 @@ from .const import ( PLATFORM_FORMAT, Platform, ) -from .core import CALLBACK_TYPE +from .core import CALLBACK_TYPE, DOMAIN as HOMEASSISTANT_DOMAIN from .exceptions import DependencyError, HomeAssistantError +from .helpers.issue_registry import IssueSeverity, async_create_issue from .helpers.typing import ConfigType from .util import dt as dt_util, ensure_unique_string @@ -235,6 +236,16 @@ async def _async_setup_component( ), domain, ) + async_create_issue( + hass, + HOMEASSISTANT_DOMAIN, + f"integration_key_no_support_{domain}", + is_fixable=False, + severity=IssueSeverity.ERROR, + issue_domain=domain, + translation_key="integration_key_no_support", + translation_placeholders={"domain": domain}, + ) start = timer() _LOGGER.info("Setting up %s", domain)