Home Assistant Unofficial Reference 2024.12.1
homeassistant.core_config Namespace Reference

Classes

class  _ComponentSet
 
class  Config
 
class  ConfigSource
 

Functions

dict _filter_bad_internal_external_urls (dict conf)
 
Sequence[dict[str, Any]] _no_duplicate_auth_mfa_module (Sequence[dict[str, Any]] configs)
 
Sequence[dict[str, Any]] _no_duplicate_auth_provider (Sequence[dict[str, Any]] configs)
 
None _raise_issue_if_historic_currency (HomeAssistant hass, str currency)
 
None _raise_issue_if_no_country (HomeAssistant hass, str|None country)
 
Any _validate_currency (Any data)
 
str _validate_stun_or_turn_url (Any value)
 
None async_process_ha_core_config (HomeAssistant hass, dict config)
 

Variables

 _CUSTOMIZE_CONFIG_SCHEMA
 
 _CUSTOMIZE_DICT_SCHEMA
 
 _LOGGER = logging.getLogger(__name__)
 
 _PACKAGE_DEFINITION_SCHEMA = vol.Schema({cv.string: vol.Any(dict, list, None)})
 
 _PACKAGES_CONFIG_SCHEMA = vol.Schema({cv.string: vol.Any(dict, list)})
 
 CORE_CONFIG_SCHEMA
 
string CORE_STORAGE_KEY = "core.config"
 
int CORE_STORAGE_MINOR_VERSION = 4
 
int CORE_STORAGE_VERSION = 1
 
 Final
 

Detailed Description

Module to help with parsing and generating configuration files.

Function Documentation

◆ _filter_bad_internal_external_urls()

dict homeassistant.core_config._filter_bad_internal_external_urls ( dict  conf)
private
Filter internal/external URL with a path.

Definition at line 148 of file core_config.py.

◆ _no_duplicate_auth_mfa_module()

Sequence[dict[str, Any]] homeassistant.core_config._no_duplicate_auth_mfa_module ( Sequence[dict[str, Any]]  configs)
private
No duplicate auth mfa module item allowed in a list.

Each type of mfa module can only have one config without optional id.
A global unique id is required if same type of mfa module used multiple
times.
Note: this is different than auth provider

Definition at line 125 of file core_config.py.

◆ _no_duplicate_auth_provider()

Sequence[dict[str, Any]] homeassistant.core_config._no_duplicate_auth_provider ( Sequence[dict[str, Any]]  configs)
private
No duplicate auth provider config allowed in a list.

Each type of auth provider can only have one config without optional id.
Unique id is required if same type of auth provider used multiple times.

Definition at line 104 of file core_config.py.

◆ _raise_issue_if_historic_currency()

None homeassistant.core_config._raise_issue_if_historic_currency ( HomeAssistant  hass,
str  currency 
)
private

Definition at line 191 of file core_config.py.

◆ _raise_issue_if_no_country()

None homeassistant.core_config._raise_issue_if_no_country ( HomeAssistant  hass,
str | None  country 
)
private

Definition at line 208 of file core_config.py.

◆ _validate_currency()

Any homeassistant.core_config._validate_currency ( Any  data)
private

Definition at line 224 of file core_config.py.

◆ _validate_stun_or_turn_url()

str homeassistant.core_config._validate_stun_or_turn_url ( Any  value)
private
Validate an URL.

Definition at line 233 of file core_config.py.

◆ async_process_ha_core_config()

None homeassistant.core_config.async_process_ha_core_config ( HomeAssistant  hass,
dict  config 
)
Process the [homeassistant] section from the configuration.

This method is a coroutine.

Definition at line 327 of file core_config.py.

Variable Documentation

◆ _CUSTOMIZE_CONFIG_SCHEMA

homeassistant.core_config._CUSTOMIZE_CONFIG_SCHEMA
private
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_CUSTOMIZE, default={}): vol.Schema(
4  {cv.entity_id: _CUSTOMIZE_DICT_SCHEMA}
5  ),
6  vol.Optional(CONF_CUSTOMIZE_DOMAIN, default={}): vol.Schema(
7  {cv.string: _CUSTOMIZE_DICT_SCHEMA}
8  ),
9  vol.Optional(CONF_CUSTOMIZE_GLOB, default={}): vol.Schema(
10  {cv.string: _CUSTOMIZE_DICT_SCHEMA}
11  ),
12  }
13 )

Definition at line 176 of file core_config.py.

◆ _CUSTOMIZE_DICT_SCHEMA

homeassistant.core_config._CUSTOMIZE_DICT_SCHEMA
private
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(ATTR_FRIENDLY_NAME): cv.string,
4  vol.Optional(ATTR_HIDDEN): cv.boolean,
5  vol.Optional(ATTR_ASSUMED_STATE): cv.boolean,
6  },
7  extra=vol.ALLOW_EXTRA,
8 )

Definition at line 167 of file core_config.py.

◆ _LOGGER

homeassistant.core_config._LOGGER = logging.getLogger(__name__)
private

Definition at line 82 of file core_config.py.

◆ _PACKAGE_DEFINITION_SCHEMA

homeassistant.core_config._PACKAGE_DEFINITION_SCHEMA = vol.Schema({cv.string: vol.Any(dict, list, None)})
private

Definition at line 165 of file core_config.py.

◆ _PACKAGES_CONFIG_SCHEMA

homeassistant.core_config._PACKAGES_CONFIG_SCHEMA = vol.Schema({cv.string: vol.Any(dict, list)})
private

Definition at line 162 of file core_config.py.

◆ CORE_CONFIG_SCHEMA

homeassistant.core_config.CORE_CONFIG_SCHEMA

Definition at line 243 of file core_config.py.

◆ CORE_STORAGE_KEY

string homeassistant.core_config.CORE_STORAGE_KEY = "core.config"

Definition at line 90 of file core_config.py.

◆ CORE_STORAGE_MINOR_VERSION

int homeassistant.core_config.CORE_STORAGE_MINOR_VERSION = 4

Definition at line 92 of file core_config.py.

◆ CORE_STORAGE_VERSION

int homeassistant.core_config.CORE_STORAGE_VERSION = 1

Definition at line 91 of file core_config.py.

◆ Final

homeassistant.core_config.Final

Definition at line 86 of file core_config.py.