Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.trace.TraceElement Class Reference

Public Member Functions

None __init__ (self, TemplateVarsType variables, str path)
 
str __repr__ (self)
 
dict[str, Any] as_dict (self)
 
None set_child_id (self, str child_key, str child_run_id)
 
None set_error (self, BaseException|None ex)
 
None set_result (self, **Any kwargs)
 
None update_result (self, **Any kwargs)
 
None update_variables (self, TemplateVarsType variables)
 

Public Attributes

 reuse_by_child
 

Static Public Attributes

 default
 

Private Attributes

 _child_key
 
 _child_run_id
 
 _error
 
 _last_variables
 
 _result
 
 _timestamp
 
 _variables
 

Static Private Attributes

tuple __slots__
 

Detailed Description

Container for trace data.

Definition at line 18 of file trace.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.trace.TraceElement.__init__ (   self,
TemplateVarsType  variables,
str  path 
)
Container for trace data.

Definition at line 33 of file trace.py.

Member Function Documentation

◆ __repr__()

str homeassistant.helpers.trace.TraceElement.__repr__ (   self)
Container for trace data.

Definition at line 46 of file trace.py.

◆ as_dict()

dict[str, Any] homeassistant.helpers.trace.TraceElement.as_dict (   self)
Return dictionary version of this TraceElement.

Definition at line 81 of file trace.py.

◆ set_child_id()

None homeassistant.helpers.trace.TraceElement.set_child_id (   self,
str  child_key,
str  child_run_id 
)
Set trace id of a nested script run.

Definition at line 50 of file trace.py.

◆ set_error()

None homeassistant.helpers.trace.TraceElement.set_error (   self,
BaseException | None  ex 
)
Set error.

Definition at line 55 of file trace.py.

◆ set_result()

None homeassistant.helpers.trace.TraceElement.set_result (   self,
**Any  kwargs 
)
Set result.

Definition at line 59 of file trace.py.

◆ update_result()

None homeassistant.helpers.trace.TraceElement.update_result (   self,
**Any  kwargs 
)
Set result.

Definition at line 63 of file trace.py.

◆ update_variables()

None homeassistant.helpers.trace.TraceElement.update_variables (   self,
TemplateVarsType  variables 
)
Update variables.

Definition at line 68 of file trace.py.

Member Data Documentation

◆ __slots__

tuple homeassistant.helpers.trace.TraceElement.__slots__
staticprivate
Initial value:
= (
"_child_key",
"_child_run_id",
"_error",
"_last_variables",
"path",
"_result",
"reuse_by_child",
"_timestamp",
"_variables",
)

Definition at line 21 of file trace.py.

◆ _child_key

homeassistant.helpers.trace.TraceElement._child_key
private

Definition at line 52 of file trace.py.

◆ _child_run_id

homeassistant.helpers.trace.TraceElement._child_run_id
private

Definition at line 53 of file trace.py.

◆ _error

homeassistant.helpers.trace.TraceElement._error
private

Definition at line 57 of file trace.py.

◆ _last_variables

homeassistant.helpers.trace.TraceElement._last_variables
private

Definition at line 43 of file trace.py.

◆ _result

homeassistant.helpers.trace.TraceElement._result
private

Definition at line 61 of file trace.py.

◆ _timestamp

homeassistant.helpers.trace.TraceElement._timestamp
private

Definition at line 41 of file trace.py.

◆ _variables

homeassistant.helpers.trace.TraceElement._variables
private

Definition at line 79 of file trace.py.

◆ default

homeassistant.helpers.trace.TraceElement.default
static

Definition at line 103 of file trace.py.

◆ reuse_by_child

homeassistant.helpers.trace.TraceElement.reuse_by_child

Definition at line 40 of file trace.py.


The documentation for this class was generated from the following file: