Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.trace.util Namespace Reference

Functions

None _async_store_restored_trace (HomeAssistant hass, RestoredTrace trace)
 
list[dict[str, Any]] _get_debug_traces (HomeAssistant hass, str key)
 
dict[str, BaseTraceasync_get_trace (HomeAssistant hass, str key, str run_id)
 
dict[str, dict[str, str]] async_list_contexts (HomeAssistant hass, str|None key)
 
list[dict[str, Any]] async_list_traces (HomeAssistant hass, str wanted_domain, str|None wanted_key)
 
None async_restore_traces (HomeAssistant hass)
 
None async_store_trace (HomeAssistant hass, ActionTrace trace, int stored_traces)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 

Detailed Description

Support for script and automation tracing and debugging.

Function Documentation

◆ _async_store_restored_trace()

None homeassistant.components.trace.util._async_store_restored_trace ( HomeAssistant  hass,
RestoredTrace  trace 
)
private
Store a restored trace and move it to the end of the LimitedSizeDict.

Definition at line 94 of file util.py.

◆ _get_debug_traces()

list[dict[str, Any]] homeassistant.components.trace.util._get_debug_traces ( HomeAssistant  hass,
str  key 
)
private
Return a serializable list of debug traces for a script or automation.

Definition at line 55 of file util.py.

◆ async_get_trace()

dict[str, BaseTrace] homeassistant.components.trace.util.async_get_trace ( HomeAssistant  hass,
str  key,
str   run_id 
)
Return the requested trace.

Definition at line 19 of file util.py.

◆ async_list_contexts()

dict[str, dict[str, str]] homeassistant.components.trace.util.async_list_contexts ( HomeAssistant  hass,
str | None   key 
)
List contexts for which we have traces.

Definition at line 29 of file util.py.

◆ async_list_traces()

list[dict[str, Any]] homeassistant.components.trace.util.async_list_traces ( HomeAssistant  hass,
str  wanted_domain,
str | None   wanted_key 
)
List traces for a domain.

Definition at line 62 of file util.py.

◆ async_restore_traces()

None homeassistant.components.trace.util.async_restore_traces ( HomeAssistant  hass)
Restore saved traces.

Definition at line 104 of file util.py.

◆ async_store_trace()

None homeassistant.components.trace.util.async_store_trace ( HomeAssistant  hass,
ActionTrace  trace,
int   stored_traces 
)
Store a trace if its key is valid.

Definition at line 81 of file util.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.trace.util._LOGGER = logging.getLogger(__name__)
private

Definition at line 16 of file util.py.