Add issue when integration key YAML not supported (#93807)
* Add issue when integration key YAML not supported * Fix feedback * Fix review * Update homeassistant/components/homeassistant/strings.json Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --------- Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>pull/93858/head
parent
661aedde90
commit
3f3b833034
|
@ -11,6 +11,10 @@
|
||||||
"python_version": {
|
"python_version": {
|
||||||
"title": "Support for Python {current_python_version} is being removed",
|
"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."
|
"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": {
|
"system_health": {
|
||||||
|
|
|
@ -18,8 +18,9 @@ from .const import (
|
||||||
PLATFORM_FORMAT,
|
PLATFORM_FORMAT,
|
||||||
Platform,
|
Platform,
|
||||||
)
|
)
|
||||||
from .core import CALLBACK_TYPE
|
from .core import CALLBACK_TYPE, DOMAIN as HOMEASSISTANT_DOMAIN
|
||||||
from .exceptions import DependencyError, HomeAssistantError
|
from .exceptions import DependencyError, HomeAssistantError
|
||||||
|
from .helpers.issue_registry import IssueSeverity, async_create_issue
|
||||||
from .helpers.typing import ConfigType
|
from .helpers.typing import ConfigType
|
||||||
from .util import dt as dt_util, ensure_unique_string
|
from .util import dt as dt_util, ensure_unique_string
|
||||||
|
|
||||||
|
@ -235,6 +236,16 @@ async def _async_setup_component(
|
||||||
),
|
),
|
||||||
domain,
|
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()
|
start = timer()
|
||||||
_LOGGER.info("Setting up %s", domain)
|
_LOGGER.info("Setting up %s", domain)
|
||||||
|
|
Loading…
Reference in New Issue