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) |
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.
| 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.
|
private |
Schedule saving the iid allocations.
Definition at line 126 of file iidmanager.py.
|
private |
Return data of entity map to store in a file.
Definition at line 137 of file iidmanager.py.
| None homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.async_initialize | ( | self | ) |
Load the latest IID data.
Definition at line 78 of file iidmanager.py.
| None homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.async_save | ( | self | ) |
Save the iid allocations.
Definition at line 131 of file iidmanager.py.
| 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.
| homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.allocations |
Definition at line 88 of file iidmanager.py.
| homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.entry_id |
Definition at line 75 of file iidmanager.py.
| homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.hass |
Definition at line 72 of file iidmanager.py.
| homeassistant.components.homekit.iidmanager.AccessoryIIDStorage.store |
Definition at line 81 of file iidmanager.py.