Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.template.AllStates Class Reference

Public Member Functions

str __call__ (self, str entity_id, bool|object rounded=_SENTINEL, bool with_unit=False)
 
def __getattr__ (self, name)
 
None __init__ (self, HomeAssistant hass)
 
Generator[TemplateState__iter__ (self)
 
int __len__ (self)
 
str __repr__ (self)
 

Private Member Functions

None _collect_all (self)
 
None _collect_all_lifecycle (self)
 

Private Attributes

 _hass
 

Static Private Attributes

 __delitem__ = _readonly
 
def __getitem__ = __getattr__
 
 __setitem__ = _readonly
 
tuple __slots__ = ("_hass",)
 

Detailed Description

Class to expose all HA states as attributes.

Definition at line 882 of file template.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.template.AllStates.__init__ (   self,
HomeAssistant  hass 
)
Initialize all states.

Definition at line 889 of file template.py.

Member Function Documentation

◆ __call__()

str homeassistant.helpers.template.AllStates.__call__ (   self,
str  entity_id,
bool | object   rounded = _SENTINEL,
bool   with_unit = False 
)
Return the states.

Definition at line 928 of file template.py.

◆ __getattr__()

def homeassistant.helpers.template.AllStates.__getattr__ (   self,
  name 
)
Return the domain state.

Definition at line 893 of file template.py.

◆ __iter__()

Generator[TemplateState] homeassistant.helpers.template.AllStates.__iter__ (   self)
Return all states.

Definition at line 918 of file template.py.

◆ __len__()

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

Definition at line 923 of file template.py.

◆ __repr__()

str homeassistant.helpers.template.AllStates.__repr__ (   self)
Representation of All States.

Definition at line 944 of file template.py.

◆ _collect_all()

None homeassistant.helpers.template.AllStates._collect_all (   self)
private

Definition at line 910 of file template.py.

◆ _collect_all_lifecycle()

None homeassistant.helpers.template.AllStates._collect_all_lifecycle (   self)
private

Definition at line 914 of file template.py.

Member Data Documentation

◆ __delitem__

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

Definition at line 886 of file template.py.

◆ __getitem__

def homeassistant.helpers.template.AllStates.__getitem__ = __getattr__
staticprivate

Definition at line 908 of file template.py.

◆ __setitem__

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

Definition at line 885 of file template.py.

◆ __slots__

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

Definition at line 887 of file template.py.

◆ _hass

homeassistant.helpers.template.AllStates._hass
private

Definition at line 891 of file template.py.


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