Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.homekit.aidmanager Namespace Reference

Classes

class  AccessoryAidStorage
 

Functions

Generator[int] _generate_aids (str|None unique_id, str entity_id)
 
str get_system_unique_id (er.RegistryEntry entity, str entity_unique_id)
 

Variables

int AID_MANAGER_SAVE_DELAY = 2
 
int AID_MANAGER_STORAGE_VERSION = 1
 
int AID_MAX = 18446744073709551615
 
int AID_MIN = 2
 
string ALLOCATIONS_KEY = "allocations"
 
tuple INVALID_AIDS = (0, 1)
 
string UNIQUE_IDS_KEY = "unique_ids"
 

Detailed Description

Manage allocation of accessory ID's.

HomeKit needs to allocate unique numbers to each accessory. These need to
be stable between reboots and upgrades.

Using a hash function to generate them means collisions. It also means you
can't change the hash without causing breakages for HA users.

This module generates and stores them in a HA storage.

Function Documentation

◆ _generate_aids()

Generator[int] homeassistant.components.homekit.aidmanager._generate_aids ( str | None  unique_id,
str  entity_id 
)
private
Generate accessory aid.

Definition at line 42 of file aidmanager.py.

◆ get_system_unique_id()

str homeassistant.components.homekit.aidmanager.get_system_unique_id ( er.RegistryEntry  entity,
str  entity_unique_id 
)
Determine the system wide unique_id for an entity.

Definition at line 37 of file aidmanager.py.

Variable Documentation

◆ AID_MANAGER_SAVE_DELAY

int homeassistant.components.homekit.aidmanager.AID_MANAGER_SAVE_DELAY = 2

Definition at line 26 of file aidmanager.py.

◆ AID_MANAGER_STORAGE_VERSION

int homeassistant.components.homekit.aidmanager.AID_MANAGER_STORAGE_VERSION = 1

Definition at line 25 of file aidmanager.py.

◆ AID_MAX

int homeassistant.components.homekit.aidmanager.AID_MAX = 18446744073709551615

Definition at line 34 of file aidmanager.py.

◆ AID_MIN

int homeassistant.components.homekit.aidmanager.AID_MIN = 2

Definition at line 33 of file aidmanager.py.

◆ ALLOCATIONS_KEY

string homeassistant.components.homekit.aidmanager.ALLOCATIONS_KEY = "allocations"

Definition at line 28 of file aidmanager.py.

◆ INVALID_AIDS

tuple homeassistant.components.homekit.aidmanager.INVALID_AIDS = (0, 1)

Definition at line 31 of file aidmanager.py.

◆ UNIQUE_IDS_KEY

string homeassistant.components.homekit.aidmanager.UNIQUE_IDS_KEY = "unique_ids"

Definition at line 29 of file aidmanager.py.