Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.homekit_controller.storage.EntityMapStorage Class Reference

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

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.

Member Function Documentation

◆ _async_schedule_save()

None homeassistant.components.homekit_controller.storage.EntityMapStorage._async_schedule_save (   self)
private
Schedule saving the entity map cache.

Definition at line 93 of file storage.py.

◆ _data_to_save()

StorageLayout homeassistant.components.homekit_controller.storage.EntityMapStorage._data_to_save (   self)
private
Return data of entity map to store in a file.

Definition at line 98 of file storage.py.

◆ async_create_or_update_map()

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.

◆ async_delete_map()

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.

◆ async_initialize()

None homeassistant.components.homekit_controller.storage.EntityMapStorage.async_initialize (   self)
Get the pairing cache data.

Definition at line 44 of file storage.py.

◆ get_map()

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.

Member Data Documentation

◆ hass

homeassistant.components.homekit_controller.storage.EntityMapStorage.hass

Definition at line 38 of file storage.py.

◆ storage_data

homeassistant.components.homekit_controller.storage.EntityMapStorage.storage_data

Definition at line 50 of file storage.py.

◆ store

homeassistant.components.homekit_controller.storage.EntityMapStorage.store

Definition at line 39 of file storage.py.


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