Public Member Functions | |
| None | __init__ (self, HomeAssistant hass, str entry_id) |
| None | async_initialize (self) |
| None | async_save (self) |
| None | async_schedule_save (self) |
| None | delete_aid (self, str storage_key) |
| int | get_or_allocate_aid (self, str|None unique_id, str entity_id) |
| int | get_or_allocate_aid_for_entity_id (self, str entity_id) |
Public Attributes | |
| allocated_aids | |
| allocations | |
| hass | |
| store | |
Private Member Functions | |
| dict[str, dict[str, int]] | _data_to_save (self) |
| None | _migrate_unique_id_aid_assignment_if_needed (self, str sys_unique_id, er.RegistryEntry entry) |
Private Attributes | |
| _entity_registry | |
| _entry_id | |
Holds a map of entity ID to HomeKit ID. Will generate new ID's, ensure they are unique and store them to make sure they persist over reboots.
Definition at line 62 of file aidmanager.py.
| None homeassistant.components.homekit.aidmanager.AccessoryAidStorage.__init__ | ( | self, | |
| HomeAssistant | hass, | ||
| str | entry_id | ||
| ) |
Create a new entity map store.
Definition at line 69 of file aidmanager.py.
|
private |
Return data of entity map to store in a file.
Definition at line 155 of file aidmanager.py.
|
private |
Migrate the unique id aid assignment if its changed.
Definition at line 99 of file aidmanager.py.
| None homeassistant.components.homekit.aidmanager.AccessoryAidStorage.async_initialize | ( | self | ) |
Load the latest AID data.
Definition at line 78 of file aidmanager.py.
| None homeassistant.components.homekit.aidmanager.AccessoryAidStorage.async_save | ( | self | ) |
Save the entity map cache.
Definition at line 149 of file aidmanager.py.
| None homeassistant.components.homekit.aidmanager.AccessoryAidStorage.async_schedule_save | ( | self | ) |
Schedule saving the entity map cache.
Definition at line 144 of file aidmanager.py.
| None homeassistant.components.homekit.aidmanager.AccessoryAidStorage.delete_aid | ( | self, | |
| str | storage_key | ||
| ) |
Delete an aid allocation.
Definition at line 134 of file aidmanager.py.
| int homeassistant.components.homekit.aidmanager.AccessoryAidStorage.get_or_allocate_aid | ( | self, | |
| str | None | unique_id, | ||
| str | entity_id | ||
| ) |
Allocate (and return) a new aid for an accessory.
Definition at line 112 of file aidmanager.py.
| int homeassistant.components.homekit.aidmanager.AccessoryAidStorage.get_or_allocate_aid_for_entity_id | ( | self, | |
| str | entity_id | ||
| ) |
Generate a stable aid for an entity id.
Definition at line 90 of file aidmanager.py.
|
private |
Definition at line 76 of file aidmanager.py.
|
private |
Definition at line 74 of file aidmanager.py.
| homeassistant.components.homekit.aidmanager.AccessoryAidStorage.allocated_aids |
Definition at line 88 of file aidmanager.py.
| homeassistant.components.homekit.aidmanager.AccessoryAidStorage.allocations |
Definition at line 87 of file aidmanager.py.
| homeassistant.components.homekit.aidmanager.AccessoryAidStorage.hass |
Definition at line 71 of file aidmanager.py.
| homeassistant.components.homekit.aidmanager.AccessoryAidStorage.store |
Definition at line 81 of file aidmanager.py.