Classes | |
| class | _PlatformIntegration |
| class | ConfigErrorTranslationKey |
| class | ConfigExceptionInfo |
| class | IntegrationConfigInfo |
Functions | |
| ConfigType|None | _async_load_and_validate_platform_integration (str domain, str|None integration_docs, list[ConfigExceptionInfo] config_exceptions, _PlatformIntegration p_integration) |
| tuple[str, int|str]|None | _get_annotation (Any item) |
| Any | _get_by_path (dict|list data, list[Hashable] items) |
| tuple[str|None, bool, dict[str, str]] | _get_log_message_and_stack_print_pref (HomeAssistant hass, str domain, ConfigExceptionInfo platform_exception) |
| str|None | _identify_config_schema (ComponentProtocol module) |
| None | _log_pkg_error (HomeAssistant hass, str package, str|None component, dict config, str message) |
| str|None | _recursive_merge (dict[str, Any] conf, dict[str, Any] package) |
| str | _relpath (HomeAssistant hass, str path) |
| None | _validate_package_definition (str name, Any conf) |
| bool | _write_default_config (str config_dir) |
| str|None | async_check_ha_config_file (HomeAssistant hass) |
| bool | async_create_default_config (HomeAssistant hass) |
| ConfigType|None | async_drop_config_annotations (IntegrationConfigInfo integration_config_info, Integration integration) |
| None | async_enable_safe_mode (HomeAssistant hass) |
| bool | async_ensure_config_exists (HomeAssistant hass) |
| None | async_handle_component_errors (HomeAssistant hass, IntegrationConfigInfo integration_config_info, Integration integration, bool raise_on_failure=False) |
| dict | async_hass_config_yaml (HomeAssistant hass) |
| None | async_log_config_validator_error (vol.Invalid|HomeAssistantError exc, str domain, dict config, HomeAssistant hass, str|None link=None) |
| None | async_log_schema_error (vol.Invalid exc, str domain, dict config, HomeAssistant hass, str|None link=None) |
| ConfigType|None | async_process_component_and_handle_errors (HomeAssistant hass, ConfigType config, Integration integration, bool raise_on_failure=False) |
| IntegrationConfigInfo | async_process_component_config (HomeAssistant hass, ConfigType config, Integration integration, ComponentProtocol|None component=None) |
| Iterable[tuple[str|None, ConfigType]] | config_per_platform (ConfigType config, str domain) |
| ConfigType | config_without_domain (ConfigType config, str domain) |
| Sequence[str] | extract_domain_configs (ConfigType config, str domain) |
| dict[str, set[str]] | extract_platform_integrations (ConfigType config, set[str] domains) |
| tuple[str, int|str]|None | find_annotation (dict|list config, list[Hashable] path) |
| str | format_homeassistant_error (HomeAssistant hass, HomeAssistantError exc, str domain, dict config, str|None link=None) |
| str | format_schema_error (HomeAssistant hass, vol.Invalid exc, str domain, dict config, str|None link=None) |
| str | get_default_config_dir () |
| str | humanize_error (HomeAssistant hass, vol.Invalid validation_error, str domain, dict config, str|None link, int max_sub_error_length=MAX_VALIDATION_ERROR_ITEM_LENGTH) |
| dict[Any, Any] | load_yaml_config_file (str config_path, Secrets|None secrets=None) |
| dict | merge_packages_config (HomeAssistant hass, dict config, dict[str, Any] packages, Callable[[HomeAssistant, str, str|None, dict, str], None] _log_pkg_error=_log_pkg_error) |
| None | process_ha_config_upgrade (HomeAssistant hass) |
| bool | safe_mode_enabled (str config_dir) |
| str | stringify_invalid (HomeAssistant hass, vol.Invalid exc, str domain, dict config, str|None link, int max_sub_error_length) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| string | AUTOMATION_CONFIG_PATH = "automations.yaml" |
| string | CONFIG_DIR_NAME = ".homeassistant" |
| string | DEFAULT_CONFIG |
| string | DEFAULT_SECRETS |
| tuple | INTEGRATION_LOAD_EXCEPTIONS = (IntegrationNotFound, RequirementsNotFound) |
| tuple | LOAD_EXCEPTIONS = (ImportError, FileNotFoundError) |
| RE_ASCII = re.compile(r"\033\[[^m]*m") | |
| RE_YAML_ERROR = re.compile(r"homeassistant\.util\.yaml") | |
| string | SAFE_MODE_FILENAME = "safe-mode" |
| string | SCENE_CONFIG_PATH = "scenes.yaml" |
| string | SCRIPT_CONFIG_PATH = "scripts.yaml" |
| string | TTS_92 |
| string | TTS_PRE_92 |
| string | VERSION_FILE = ".HA_VERSION" |
| string | YAML_CONFIG_FILE = "configuration.yaml" |
Module to help with parsing and generating configuration files.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| str | None homeassistant.config.async_check_ha_config_file | ( | HomeAssistant | hass | ) |
| bool homeassistant.config.async_create_default_config | ( | HomeAssistant | hass | ) |
| ConfigType | None homeassistant.config.async_drop_config_annotations | ( | IntegrationConfigInfo | integration_config_info, |
| Integration | integration | ||
| ) |
| None homeassistant.config.async_enable_safe_mode | ( | HomeAssistant | hass | ) |
| bool homeassistant.config.async_ensure_config_exists | ( | HomeAssistant | hass | ) |
| None homeassistant.config.async_handle_component_errors | ( | HomeAssistant | hass, |
| IntegrationConfigInfo | integration_config_info, | ||
| Integration | integration, | ||
| bool | raise_on_failure = False |
||
| ) |
| dict homeassistant.config.async_hass_config_yaml | ( | HomeAssistant | hass | ) |
| None homeassistant.config.async_log_config_validator_error | ( | vol.Invalid | HomeAssistantError | exc, |
| str | domain, | ||
| dict | config, | ||
| HomeAssistant | hass, | ||
| str | None | link = None |
||
| ) |
| None homeassistant.config.async_log_schema_error | ( | vol.Invalid | exc, |
| str | domain, | ||
| dict | config, | ||
| HomeAssistant | hass, | ||
| str | None | link = None |
||
| ) |
| ConfigType | None homeassistant.config.async_process_component_and_handle_errors | ( | HomeAssistant | hass, |
| ConfigType | config, | ||
| Integration | integration, | ||
| bool | raise_on_failure = False |
||
| ) |
| IntegrationConfigInfo homeassistant.config.async_process_component_config | ( | HomeAssistant | hass, |
| ConfigType | config, | ||
| Integration | integration, | ||
| ComponentProtocol | None | component = None |
||
| ) |
| Iterable[tuple[str | None, ConfigType]] homeassistant.config.config_per_platform | ( | ConfigType | config, |
| str | domain | ||
| ) |
| ConfigType homeassistant.config.config_without_domain | ( | ConfigType | config, |
| str | domain | ||
| ) |
| Sequence[str] homeassistant.config.extract_domain_configs | ( | ConfigType | config, |
| str | domain | ||
| ) |
| dict[str, set[str]] homeassistant.config.extract_platform_integrations | ( | ConfigType | config, |
| set[str] | domains | ||
| ) |
| tuple[str, int | str] | None homeassistant.config.find_annotation | ( | dict | list | config, |
| list[Hashable] | path | ||
| ) |
| str homeassistant.config.format_homeassistant_error | ( | HomeAssistant | hass, |
| HomeAssistantError | exc, | ||
| str | domain, | ||
| dict | config, | ||
| str | None | link = None |
||
| ) |
| str homeassistant.config.format_schema_error | ( | HomeAssistant | hass, |
| vol.Invalid | exc, | ||
| str | domain, | ||
| dict | config, | ||
| str | None | link = None |
||
| ) |
| str homeassistant.config.get_default_config_dir | ( | ) |
| str homeassistant.config.humanize_error | ( | HomeAssistant | hass, |
| vol.Invalid | validation_error, | ||
| str | domain, | ||
| dict | config, | ||
| str | None | link, | ||
| int | max_sub_error_length = MAX_VALIDATION_ERROR_ITEM_LENGTH |
||
| ) |
| dict[Any, Any] homeassistant.config.load_yaml_config_file | ( | str | config_path, |
| Secrets | None | secrets = None |
||
| ) |
| dict homeassistant.config.merge_packages_config | ( | HomeAssistant | hass, |
| dict | config, | ||
| dict[str, Any] | packages, | ||
| Callable[ [HomeAssistant, str, str | None, dict, str], None ] | _log_pkg_error = _log_pkg_error |
||
| ) |
| None homeassistant.config.process_ha_config_upgrade | ( | HomeAssistant | hass | ) |
| bool homeassistant.config.safe_mode_enabled | ( | str | config_dir | ) |
| str homeassistant.config.stringify_invalid | ( | HomeAssistant | hass, |
| vol.Invalid | exc, | ||
| str | domain, | ||
| dict | config, | ||
| str | None | link, | ||
| int | max_sub_error_length | ||
| ) |
Stringify voluptuous.Invalid. This is an alternative to the custom __str__ implemented in voluptuous.error.Invalid. The modifications are: - Format the path delimited by -> instead of @data[] - Prefix with domain, file and line of the error - Suffix with a link to the documentation - Give a more user friendly output for unknown options - Give a more user friendly output for missing options
|
private |
| string homeassistant.config.AUTOMATION_CONFIG_PATH = "automations.yaml" |
| string homeassistant.config.CONFIG_DIR_NAME = ".homeassistant" |
| string homeassistant.config.DEFAULT_CONFIG |
| string homeassistant.config.DEFAULT_SECRETS |
| tuple homeassistant.config.INTEGRATION_LOAD_EXCEPTIONS = (IntegrationNotFound, RequirementsNotFound) |
| tuple homeassistant.config.LOAD_EXCEPTIONS = (ImportError, FileNotFoundError) |
| homeassistant.config.RE_ASCII = re.compile(r"\033\[[^m]*m") |
| homeassistant.config.RE_YAML_ERROR = re.compile(r"homeassistant\.util\.yaml") |
| string homeassistant.config.SAFE_MODE_FILENAME = "safe-mode" |
| string homeassistant.config.SCENE_CONFIG_PATH = "scenes.yaml" |
| string homeassistant.config.SCRIPT_CONFIG_PATH = "scripts.yaml" |
| string homeassistant.config.TTS_92 |
| string homeassistant.config.TTS_PRE_92 |