Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.script_variables.ScriptVariables Class Reference

Public Member Functions

None __init__ (self, dict[str, Any] variables)
 
dict[str, Any] as_dict (self)
 
dict[str, Any] async_render (self, HomeAssistant hass, Mapping[str, Any]|None run_variables, *bool render_as_defaults=True, bool limited=False)
 

Public Attributes

 variables
 

Private Attributes

 _has_template
 

Detailed Description

Class to hold and render script variables.

Definition at line 13 of file script_variables.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.script_variables.ScriptVariables.__init__ (   self,
dict[str, Any]  variables 
)
Initialize script variables.

Definition at line 16 of file script_variables.py.

Member Function Documentation

◆ as_dict()

dict[str, Any] homeassistant.helpers.script_variables.ScriptVariables.as_dict (   self)
Return dict version of this class.

Definition at line 68 of file script_variables.py.

◆ async_render()

dict[str, Any] homeassistant.helpers.script_variables.ScriptVariables.async_render (   self,
HomeAssistant  hass,
Mapping[str, Any] | None  run_variables,
*bool   render_as_defaults = True,
bool   limited = False 
)
Render script variables.

The run variables are used to compute the static variables.

If `render_as_defaults` is True, the run variables will not be overridden.

Definition at line 22 of file script_variables.py.

Member Data Documentation

◆ _has_template

homeassistant.helpers.script_variables.ScriptVariables._has_template
private

Definition at line 38 of file script_variables.py.

◆ variables

homeassistant.helpers.script_variables.ScriptVariables.variables

Definition at line 18 of file script_variables.py.


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