homeassistant.bootstrap

Provide methods to bootstrap a Home Assistant instance.

homeassistant.bootstrap.async_enable_logging(hass: homeassistant.core.HomeAssistant, verbose: bool = False, log_rotate_days: Optional[int] = None, log_file: Optional[str] = None, log_no_color: bool = False) → None[source]

Set up the logging.

This method must be run in the event loop.

homeassistant.bootstrap.async_from_config_dict(config: Dict[str, Any], hass: homeassistant.core.HomeAssistant, config_dir: Optional[str] = None, enable_log: bool = True, verbose: bool = False, skip_pip: bool = False, log_rotate_days: Any = None, log_file: Any = None, log_no_color: bool = False) → Optional[homeassistant.core.HomeAssistant][source]

Try to configure Home Assistant from a configuration dictionary.

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

homeassistant.bootstrap.async_from_config_file(config_path: str, hass: homeassistant.core.HomeAssistant, verbose: bool = False, skip_pip: bool = True, log_rotate_days: Any = None, log_file: Any = None, log_no_color: bool = False) → Optional[homeassistant.core.HomeAssistant][source]

Read the configuration file and try to start all the functionality.

Will add functionality to ‘hass’ parameter. This method is a coroutine.

homeassistant.bootstrap.async_mount_local_lib_path(config_dir: str) → str[source]

Add local library to Python Path.

This function is a coroutine.

homeassistant.bootstrap.from_config_dict(config: Dict[str, Any], hass: Optional[homeassistant.core.HomeAssistant] = None, config_dir: Optional[str] = None, enable_log: bool = True, verbose: bool = False, skip_pip: bool = False, log_rotate_days: Any = None, log_file: Any = None, log_no_color: bool = False) → Optional[homeassistant.core.HomeAssistant][source]

Try to configure Home Assistant from a configuration dictionary.

Dynamically loads required components and its dependencies.

homeassistant.bootstrap.from_config_file(config_path: str, hass: Optional[homeassistant.core.HomeAssistant] = None, verbose: bool = False, skip_pip: bool = True, log_rotate_days: Any = None, log_file: Any = None, log_no_color: bool = False) → Optional[homeassistant.core.HomeAssistant][source]

Read the configuration file and try to start all the functionality.

Will add functionality to ‘hass’ parameter if given, instantiates a new Home Assistant object if ‘hass’ is not given.