Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.homekit.iidmanager.AccessoryIIDStorage Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, str entry_id)
 
None async_initialize (self)
 
None async_save (self)
 
int get_or_allocate_iid (self, int aid, UUID service_uuid, str|None service_unique_id, UUID|None char_uuid, str|None char_unique_id)
 

Public Attributes

 allocations
 
 entry_id
 
 hass
 
 store
 

Private Member Functions

None _async_schedule_save (self)
 
dict[str, dict[str, dict[str, int]]] _data_to_save (self)
 

Detailed Description

Provide stable allocation of IIDs for the lifetime of an accessory.

Will generate new ID's, ensure they are unique and store them to make sure they
persist over reboots.

Definition at line 63 of file iidmanager.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.__init__ (   self,
HomeAssistant  hass,
str  entry_id 
)
Create a new iid store.

Definition at line 70 of file iidmanager.py.

Member Function Documentation

◆ _async_schedule_save()

None homeassistant.components.homekit.iidmanager.AccessoryIIDStorage._async_schedule_save (   self)
private
Schedule saving the iid allocations.

Definition at line 126 of file iidmanager.py.

◆ _data_to_save()

dict[str, dict[str, dict[str, int]]] homeassistant.components.homekit.iidmanager.AccessoryIIDStorage._data_to_save (   self)
private
Return data of entity map to store in a file.

Definition at line 137 of file iidmanager.py.

◆ async_initialize()

None homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.async_initialize (   self)
Load the latest IID data.

Definition at line 78 of file iidmanager.py.

◆ async_save()

None homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.async_save (   self)
Save the iid allocations.

Definition at line 131 of file iidmanager.py.

◆ get_or_allocate_iid()

int homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.get_or_allocate_iid (   self,
int  aid,
UUID  service_uuid,
str | None  service_unique_id,
UUID | None  char_uuid,
str | None  char_unique_id 
)
Generate a stable iid.

Definition at line 92 of file iidmanager.py.

Member Data Documentation

◆ allocations

homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.allocations

Definition at line 88 of file iidmanager.py.

◆ entry_id

homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.entry_id

Definition at line 75 of file iidmanager.py.

◆ hass

homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.hass

Definition at line 72 of file iidmanager.py.

◆ store

homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.store

Definition at line 81 of file iidmanager.py.


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