Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.start Namespace Reference

Functions

CALLBACK_TYPE _async_at_core_state (HomeAssistant hass, Callable[[HomeAssistant], Coroutine[Any, Any, None]|None] at_start_cb, EventType[NoEventData] event_type, Callable[[HomeAssistant], bool] check_state)
 
CALLBACK_TYPE async_at_start (HomeAssistant hass, Callable[[HomeAssistant], Coroutine[Any, Any, None]|None] at_start_cb)
 
CALLBACK_TYPE async_at_started (HomeAssistant hass, Callable[[HomeAssistant], Coroutine[Any, Any, None]|None] at_start_cb)
 

Detailed Description

Helpers to help during startup.

Function Documentation

◆ _async_at_core_state()

CALLBACK_TYPE homeassistant.helpers.start._async_at_core_state ( HomeAssistant  hass,
Callable[[HomeAssistant], Coroutine[Any, Any, None] | None]  at_start_cb,
EventType[NoEventData]  event_type,
Callable[[HomeAssistant], bool]  check_state 
)
private
Execute a job at_start_cb when Home Assistant has the wanted state.

The job is executed immediately if Home Assistant is in the wanted state.
Will wait for event specified by event_type if it isn't.

Definition at line 23 of file start.py.

◆ async_at_start()

CALLBACK_TYPE homeassistant.helpers.start.async_at_start ( HomeAssistant  hass,
Callable[[HomeAssistant], Coroutine[Any, Any, None] | None]  at_start_cb 
)
Execute a job at_start_cb when Home Assistant is starting.

The job is executed immediately if Home Assistant is already starting or started.
Will wait for EVENT_HOMEASSISTANT_START if it isn't.

Definition at line 58 of file start.py.

◆ async_at_started()

CALLBACK_TYPE homeassistant.helpers.start.async_at_started ( HomeAssistant  hass,
Callable[[HomeAssistant], Coroutine[Any, Any, None] | None]  at_start_cb 
)
Execute a job at_start_cb when Home Assistant has started.

The job is executed immediately if Home Assistant is already started.
Will wait for EVENT_HOMEASSISTANT_STARTED if it isn't.

Definition at line 77 of file start.py.