Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.collection.IDManager Class Reference

Public Member Functions

None __init__ (self)
 
None add_collection (self, dict[str, Any] collection)
 
str generate_id (self, str suggestion)
 
bool has_id (self, str item_id)
 

Detailed Description

Keep track of IDs across different collections.

Definition at line 86 of file collection.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.collection.IDManager.__init__ (   self)
Initiate the ID manager.

Definition at line 89 of file collection.py.

Member Function Documentation

◆ add_collection()

None homeassistant.helpers.collection.IDManager.add_collection (   self,
dict[str, Any]  collection 
)
Add a collection to check for ID usage.

Definition at line 93 of file collection.py.

◆ generate_id()

str homeassistant.helpers.collection.IDManager.generate_id (   self,
str  suggestion 
)
Generate an ID.

Definition at line 101 of file collection.py.

◆ has_id()

bool homeassistant.helpers.collection.IDManager.has_id (   self,
str  item_id 
)
Test if the ID exists.

Definition at line 97 of file collection.py.


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