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

Public Member Functions

TemplateState|None __getattr__ (self, str name)
 
None __init__ (self, HomeAssistant hass, str domain)
 
Generator[TemplateState__iter__ (self)
 
int __len__ (self)
 
str __repr__ (self)
 

Private Member Functions

None _collect_domain (self)
 
None _collect_domain_lifecycle (self)
 

Private Attributes

 _domain
 
 _hass
 

Static Private Attributes

 __delitem__ = _readonly
 
TemplateState|None __getitem__ = __getattr__
 
 __setitem__ = _readonly
 
tuple __slots__ = ("_hass", "_domain")
 

Detailed Description

Class to expose a specific HA domain as attributes.

Definition at line 979 of file template.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.template.DomainStates.__init__ (   self,
HomeAssistant  hass,
str  domain 
)
Initialize the domain states.

Definition at line 987 of file template.py.

Member Function Documentation

◆ __getattr__()

TemplateState | None homeassistant.helpers.template.DomainStates.__getattr__ (   self,
str  name 
)
Return the states.

Definition at line 992 of file template.py.

◆ __iter__()

Generator[TemplateState] homeassistant.helpers.template.DomainStates.__iter__ (   self)
Return the iteration over all the states.

Definition at line 1008 of file template.py.

◆ __len__()

int homeassistant.helpers.template.DomainStates.__len__ (   self)
Return number of states.

Definition at line 1013 of file template.py.

◆ __repr__()

str homeassistant.helpers.template.DomainStates.__repr__ (   self)
Representation of Domain States.

Definition at line 1018 of file template.py.

◆ _collect_domain()

None homeassistant.helpers.template.DomainStates._collect_domain (   self)
private

Definition at line 1000 of file template.py.

◆ _collect_domain_lifecycle()

None homeassistant.helpers.template.DomainStates._collect_domain_lifecycle (   self)
private

Definition at line 1004 of file template.py.

Member Data Documentation

◆ __delitem__

homeassistant.helpers.template.DomainStates.__delitem__ = _readonly
staticprivate

Definition at line 985 of file template.py.

◆ __getitem__

TemplateState | None homeassistant.helpers.template.DomainStates.__getitem__ = __getattr__
staticprivate

Definition at line 998 of file template.py.

◆ __setitem__

homeassistant.helpers.template.DomainStates.__setitem__ = _readonly
staticprivate

Definition at line 984 of file template.py.

◆ __slots__

tuple homeassistant.helpers.template.DomainStates.__slots__ = ("_hass", "_domain")
staticprivate

Definition at line 982 of file template.py.

◆ _domain

homeassistant.helpers.template.DomainStates._domain
private

Definition at line 990 of file template.py.

◆ _hass

homeassistant.helpers.template.DomainStates._hass
private

Definition at line 989 of file template.py.


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