Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.template.HassLoader Class Reference
Inheritance diagram for homeassistant.helpers.template.HassLoader:
[legend]
Collaboration diagram for homeassistant.helpers.template.HassLoader:
[legend]

Public Member Functions

None __init__ (self, dict[str, str] sources)
 
tuple[str, str|None, Callable[[], bool]|None] get_source (self, jinja2.Environment environment, str template)
 
dict[str, str] sources (self)
 
None sources (self, dict[str, str] value)
 

Private Attributes

 _reload
 
 _sources
 

Detailed Description

An in-memory jinja loader that keeps track of templates that need to be reloaded.

Definition at line 2814 of file template.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.template.HassLoader.__init__ (   self,
dict[str, str]  sources 
)
Initialize an empty HassLoader.

Definition at line 2817 of file template.py.

Member Function Documentation

◆ get_source()

tuple[str, str | None, Callable[[], bool] | None] homeassistant.helpers.template.HassLoader.get_source (   self,
jinja2.Environment  environment,
str   template 
)
Get in-memory sources.

Definition at line 2832 of file template.py.

◆ sources() [1/2]

dict[str, str] homeassistant.helpers.template.HassLoader.sources (   self)
Map filename to jinja source.

Definition at line 2823 of file template.py.

◆ sources() [2/2]

None homeassistant.helpers.template.HassLoader.sources (   self,
dict[str, str]  value 
)

Definition at line 2828 of file template.py.

Member Data Documentation

◆ _reload

homeassistant.helpers.template.HassLoader._reload
private

Definition at line 2820 of file template.py.

◆ _sources

homeassistant.helpers.template.HassLoader._sources
private

Definition at line 2819 of file template.py.


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