Public Member Functions | |
| None | __init__ (self, HomeAssistant hass) |
| Pairing | async_create_or_update_map (self, str homekit_id, int config_num, list[Any] accessories, str|None broadcast_key=None, int|None state_num=None) |
| None | async_delete_map (self, str homekit_id) |
| None | async_initialize (self) |
| Pairing|None | get_map (self, str homekit_id) |
Public Attributes | |
| hass | |
| storage_data | |
| store | |
Private Member Functions | |
| None | _async_schedule_save (self) |
| StorageLayout | _data_to_save (self) |
Holds a cache of entity structure data from a paired HomeKit device. HomeKit has a cacheable entity map that describes how an IP or BLE endpoint is structured. This object holds the latest copy of that data. An endpoint is made of accessories, services and characteristics. It is safe to cache this data until the c# discovery data changes. Caching this data means we can add HomeKit devices to HA immediately at start even if discovery hasn't seen them yet or they are out of range. It is also important for BLE devices - accessing the entity structure is very slow for these devices.
Definition at line 21 of file storage.py.
| None homeassistant.components.homekit_controller.storage.EntityMapStorage.__init__ | ( | self, | |
| HomeAssistant | hass | ||
| ) |
Create a new entity map store.
Definition at line 36 of file storage.py.
|
private |
Schedule saving the entity map cache.
Definition at line 93 of file storage.py.
|
private |
Return data of entity map to store in a file.
Definition at line 98 of file storage.py.
| Pairing homeassistant.components.homekit_controller.storage.EntityMapStorage.async_create_or_update_map | ( | self, | |
| str | homekit_id, | ||
| int | config_num, | ||
| list[Any] | accessories, | ||
| str | None | broadcast_key = None, |
||
| int | None | state_num = None |
||
| ) |
Create a new pairing cache.
Definition at line 57 of file storage.py.
| None homeassistant.components.homekit_controller.storage.EntityMapStorage.async_delete_map | ( | self, | |
| str | homekit_id | ||
| ) |
Delete pairing cache.
Definition at line 78 of file storage.py.
| None homeassistant.components.homekit_controller.storage.EntityMapStorage.async_initialize | ( | self | ) |
Get the pairing cache data.
Definition at line 44 of file storage.py.
| Pairing | None homeassistant.components.homekit_controller.storage.EntityMapStorage.get_map | ( | self, | |
| str | homekit_id | ||
| ) |
Get a pairing cache item.
Definition at line 52 of file storage.py.
| homeassistant.components.homekit_controller.storage.EntityMapStorage.hass |
Definition at line 38 of file storage.py.
| homeassistant.components.homekit_controller.storage.EntityMapStorage.storage_data |
Definition at line 50 of file storage.py.
| homeassistant.components.homekit_controller.storage.EntityMapStorage.store |
Definition at line 39 of file storage.py.