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=None) → None[source]

Set up the logging.

This method must be run in the event loop.

homeassistant.bootstrap.async_from_config_dict(config: typing.Dict[str, typing.Any], hass: homeassistant.core.HomeAssistant, config_dir: typing.Union[str, NoneType] = None, enable_log: bool = True, verbose: bool = False, skip_pip: bool = False, log_rotate_days: typing.Any = None) → typing.Union[homeassistant.core.HomeAssistant, NoneType][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: typing.Any = None)[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, loop: asyncio.events.AbstractEventLoop) → str[source]

Add local library to Python Path.

This function is a coroutine.

homeassistant.bootstrap.from_config_dict(config: typing.Dict[str, typing.Any], hass: typing.Union[homeassistant.core.HomeAssistant, NoneType] = None, config_dir: typing.Union[str, NoneType] = None, enable_log: bool = True, verbose: bool = False, skip_pip: bool = False, log_rotate_days: typing.Any = None) → typing.Union[homeassistant.core.HomeAssistant, NoneType][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: typing.Union[homeassistant.core.HomeAssistant, NoneType] = None, verbose: bool = False, skip_pip: bool = True, log_rotate_days: typing.Any = None)[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.

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

Add local library to Python Path.