Home Assistant Unofficial Reference 2024.12.1
homeassistant.bootstrap Namespace Reference

Classes

class  _RotatingFileHandlerWithoutShouldRollOver
 
class  _WatchPendingSetups
 

Functions

tuple[set[str], dict[str, loader.Integration]] _async_resolve_domains_to_setup (core.HomeAssistant hass, dict[str, Any] config)
 
None _async_set_up_integrations (core.HomeAssistant hass, dict[str, Any] config)
 
RotatingFileHandler|TimedRotatingFileHandler _create_log_file (str err_log_path, int|None log_rotate_days)
 
set[str] _get_domains (core.HomeAssistant hass, dict[str, Any] config)
 
None _init_blocking_io_modules_in_executor ()
 
None async_enable_logging (core.HomeAssistant hass, bool verbose=False, int|None log_rotate_days=None, str|None log_file=None, bool log_no_color=False)
 
core.HomeAssistant|None async_from_config_dict (ConfigType config, core.HomeAssistant hass)
 
None async_load_base_functionality (core.HomeAssistant hass)
 
str async_mount_local_lib_path (str config_dir)
 
core.HomeAssistant|None async_setup_hass (RuntimeConfig runtime_config)
 
None async_setup_multi_components (core.HomeAssistant hass, set[str] domains, dict[str, Any] config)
 
None open_hass_ui (core.HomeAssistant hass)
 

Variables

 COOLDOWN_TIME
 
 CORE_INTEGRATIONS
 
 CRITICAL_INTEGRATIONS
 
 DEBUGGER_INTEGRATIONS
 
 DEFAULT_INTEGRATIONS
 
 DEFAULT_INTEGRATIONS_RECOVERY_MODE
 
 DEFAULT_INTEGRATIONS_SUPERVISOR
 
 DISCOVERY_INTEGRATIONS
 
 ERROR_LOG_FILENAME
 
 FRONTEND_INTEGRATIONS
 
 LOG_SLOW_STARTUP_INTERVAL
 
 LOGGING_AND_HTTP_DEPS_INTEGRATIONS
 
 PRELOAD_STORAGE
 
 RECORDER_INTEGRATIONS
 
 SETUP_ORDER
 
 SETUP_ORDER_SORT_KEY
 
 SLOW_STARTUP_CHECK_INTERVAL
 
 STAGE_1_INTEGRATIONS
 
 STAGE_1_TIMEOUT
 
 STAGE_2_TIMEOUT
 
 WRAP_UP_TIMEOUT
 

Detailed Description

Provide methods to bootstrap a Home Assistant instance.

Function Documentation

◆ _async_resolve_domains_to_setup()

tuple[set[str], dict[str, loader.Integration]] homeassistant.bootstrap._async_resolve_domains_to_setup ( core.HomeAssistant  hass,
dict[str, Any]   config 
)
private
Resolve all dependencies and return list of domains to set up.

Definition at line 805 of file bootstrap.py.

◆ _async_set_up_integrations()

None homeassistant.bootstrap._async_set_up_integrations ( core.HomeAssistant  hass,
dict[str, Any]   config 
)
private
Set up all the integrations.

Definition at line 969 of file bootstrap.py.

◆ _create_log_file()

RotatingFileHandler | TimedRotatingFileHandler homeassistant.bootstrap._create_log_file ( str  err_log_path,
int | None   log_rotate_days 
)
private
Create log file and do roll over.

Definition at line 634 of file bootstrap.py.

◆ _get_domains()

set[str] homeassistant.bootstrap._get_domains ( core.HomeAssistant  hass,
dict[str, Any]  config 
)
private
Get domains of components to set up.

Definition at line 681 of file bootstrap.py.

◆ _init_blocking_io_modules_in_executor()

None homeassistant.bootstrap._init_blocking_io_modules_in_executor ( )
private
Initialize modules that do blocking I/O in executor.

Definition at line 402 of file bootstrap.py.

◆ async_enable_logging()

None homeassistant.bootstrap.async_enable_logging ( core.HomeAssistant  hass,
bool   verbose = False,
int | None   log_rotate_days = None,
str | None   log_file = None,
bool   log_no_color = False 
)
Set up the logging.

This method must be run in the event loop.

Definition at line 533 of file bootstrap.py.

◆ async_from_config_dict()

core.HomeAssistant | None homeassistant.bootstrap.async_from_config_dict ( ConfigType  config,
core.HomeAssistant   hass 
)
Try to configure Home Assistant from a configuration dictionary.

Dynamically loads required components and its dependencies.
This method is a coroutine.

Definition at line 444 of file bootstrap.py.

◆ async_load_base_functionality()

None homeassistant.bootstrap.async_load_base_functionality ( core.HomeAssistant  hass)
Load the registries and modules that will do blocking I/O.

Definition at line 419 of file bootstrap.py.

◆ async_mount_local_lib_path()

str homeassistant.bootstrap.async_mount_local_lib_path ( str  config_dir)
Add local library to Python Path.

This function is a coroutine.

Definition at line 669 of file bootstrap.py.

◆ async_setup_hass()

core.HomeAssistant | None homeassistant.bootstrap.async_setup_hass ( RuntimeConfig  runtime_config)
Set up Home Assistant.

Definition at line 258 of file bootstrap.py.

◆ async_setup_multi_components()

None homeassistant.bootstrap.async_setup_multi_components ( core.HomeAssistant  hass,
set[str]  domains,
dict[str, Any]  config 
)
Set up multiple domains. Log on failure.

Definition at line 773 of file bootstrap.py.

◆ open_hass_ui()

None homeassistant.bootstrap.open_hass_ui ( core.HomeAssistant  hass)
Open the UI.

Definition at line 382 of file bootstrap.py.

Variable Documentation

◆ COOLDOWN_TIME

homeassistant.bootstrap.COOLDOWN_TIME

Definition at line 134 of file bootstrap.py.

◆ CORE_INTEGRATIONS

homeassistant.bootstrap.CORE_INTEGRATIONS

Definition at line 140 of file bootstrap.py.

◆ CRITICAL_INTEGRATIONS

homeassistant.bootstrap.CRITICAL_INTEGRATIONS

Definition at line 219 of file bootstrap.py.

◆ DEBUGGER_INTEGRATIONS

homeassistant.bootstrap.DEBUGGER_INTEGRATIONS

Definition at line 137 of file bootstrap.py.

◆ DEFAULT_INTEGRATIONS

homeassistant.bootstrap.DEFAULT_INTEGRATIONS

Definition at line 179 of file bootstrap.py.

◆ DEFAULT_INTEGRATIONS_RECOVERY_MODE

homeassistant.bootstrap.DEFAULT_INTEGRATIONS_RECOVERY_MODE

Definition at line 211 of file bootstrap.py.

◆ DEFAULT_INTEGRATIONS_SUPERVISOR

homeassistant.bootstrap.DEFAULT_INTEGRATIONS_SUPERVISOR

Definition at line 215 of file bootstrap.py.

◆ DISCOVERY_INTEGRATIONS

homeassistant.bootstrap.DISCOVERY_INTEGRATIONS

Definition at line 164 of file bootstrap.py.

◆ ERROR_LOG_FILENAME

homeassistant.bootstrap.ERROR_LOG_FILENAME

Definition at line 123 of file bootstrap.py.

◆ FRONTEND_INTEGRATIONS

homeassistant.bootstrap.FRONTEND_INTEGRATIONS

Definition at line 153 of file bootstrap.py.

◆ LOG_SLOW_STARTUP_INTERVAL

homeassistant.bootstrap.LOG_SLOW_STARTUP_INTERVAL

Definition at line 128 of file bootstrap.py.

◆ LOGGING_AND_HTTP_DEPS_INTEGRATIONS

homeassistant.bootstrap.LOGGING_AND_HTTP_DEPS_INTEGRATIONS

Definition at line 143 of file bootstrap.py.

◆ PRELOAD_STORAGE

homeassistant.bootstrap.PRELOAD_STORAGE

Definition at line 241 of file bootstrap.py.

◆ RECORDER_INTEGRATIONS

homeassistant.bootstrap.RECORDER_INTEGRATIONS

Definition at line 159 of file bootstrap.py.

◆ SETUP_ORDER

homeassistant.bootstrap.SETUP_ORDER

Definition at line 224 of file bootstrap.py.

◆ SETUP_ORDER_SORT_KEY

homeassistant.bootstrap.SETUP_ORDER_SORT_KEY

Definition at line 120 of file bootstrap.py.

◆ SLOW_STARTUP_CHECK_INTERVAL

homeassistant.bootstrap.SLOW_STARTUP_CHECK_INTERVAL

Definition at line 129 of file bootstrap.py.

◆ STAGE_1_INTEGRATIONS

homeassistant.bootstrap.STAGE_1_INTEGRATIONS

Definition at line 165 of file bootstrap.py.

◆ STAGE_1_TIMEOUT

homeassistant.bootstrap.STAGE_1_TIMEOUT

Definition at line 131 of file bootstrap.py.

◆ STAGE_2_TIMEOUT

homeassistant.bootstrap.STAGE_2_TIMEOUT

Definition at line 132 of file bootstrap.py.

◆ WRAP_UP_TIMEOUT

homeassistant.bootstrap.WRAP_UP_TIMEOUT

Definition at line 133 of file bootstrap.py.