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

Public Member Functions

None __init__ (self, logging.Logger logger, IDManager|None id_manager=None)
 
None async_load (self, list[dict] data)
 
- Public Member Functions inherited from homeassistant.helpers.collection.ObservableCollection
None __init__ (self, IDManager|None id_manager)
 
Callable[[], None] async_add_change_set_listener (self, ChangeSetListener listener)
 
Callable[[], None] async_add_listener (self, ChangeListener listener)
 
list[_ItemT] async_items (self)
 
None notify_changes (self, Iterable[CollectionChange] change_set)
 

Static Public Member Functions

CollectionEntity create_entity (type[CollectionEntity] entity_class, ConfigType config)
 

Public Attributes

 logger
 
- Public Attributes inherited from homeassistant.helpers.collection.ObservableCollection
 id_manager
 

Detailed Description

Offer a collection based on static data.

Definition at line 184 of file collection.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.collection.YamlCollection.__init__ (   self,
logging.Logger  logger,
IDManager | None   id_manager = None 
)
Initialize the storage collection.

Definition at line 187 of file collection.py.

Member Function Documentation

◆ async_load()

None homeassistant.helpers.collection.YamlCollection.async_load (   self,
list[dict]  data 
)
Load the YAML collection. Overrides existing data.

Reimplemented in homeassistant.helpers.collection.IDLessCollection.

Definition at line 203 of file collection.py.

◆ create_entity()

CollectionEntity homeassistant.helpers.collection.YamlCollection.create_entity ( type[CollectionEntity entity_class,
ConfigType   config 
)
static
Create a CollectionEntity instance.

Definition at line 197 of file collection.py.

Member Data Documentation

◆ logger

homeassistant.helpers.collection.YamlCollection.logger

Definition at line 194 of file collection.py.


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