Home Assistant Unofficial Reference 2024.12.1
homeassistant.runner Namespace Reference

Classes

class  HassEventLoopPolicy
 
class  RuntimeConfig
 

Functions

None _async_loop_exception_handler (Any _, dict[str, Any] context)
 
None _cancel_all_tasks_with_timeout (asyncio.AbstractEventLoop loop, int timeout)
 
None _enable_posix_spawn ()
 
int run (RuntimeConfig runtime_config)
 
int setup_and_run_hass (RuntimeConfig runtime_config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
int MAX_EXECUTOR_WORKERS = 64
 
int TASK_CANCELATION_TIMEOUT = 5
 

Detailed Description

Run Home Assistant.

Function Documentation

◆ _async_loop_exception_handler()

None homeassistant.runner._async_loop_exception_handler ( Any  _,
dict[str, Any]  context 
)
private
Handle all exception inside the core loop.

Definition at line 94 of file runner.py.

◆ _cancel_all_tasks_with_timeout()

None homeassistant.runner._cancel_all_tasks_with_timeout ( asyncio.AbstractEventLoop  loop,
int   timeout 
)
private
Adapted _cancel_all_tasks from python 3.9 with a timeout.

Definition at line 165 of file runner.py.

◆ _enable_posix_spawn()

None homeassistant.runner._enable_posix_spawn ( )
private
Enable posix_spawn on Alpine Linux.

Definition at line 133 of file runner.py.

◆ run()

int homeassistant.runner.run ( RuntimeConfig  runtime_config)
Run Home Assistant.

Definition at line 146 of file runner.py.

◆ setup_and_run_hass()

int homeassistant.runner.setup_and_run_hass ( RuntimeConfig  runtime_config)
Set up Home Assistant and run.

Definition at line 120 of file runner.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 35 of file runner.py.

◆ MAX_EXECUTOR_WORKERS

int homeassistant.runner.MAX_EXECUTOR_WORKERS = 64

Definition at line 32 of file runner.py.

◆ TASK_CANCELATION_TIMEOUT

int homeassistant.runner.TASK_CANCELATION_TIMEOUT = 5

Definition at line 33 of file runner.py.