Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.person.PersonStorageCollection Class Reference
Inheritance diagram for homeassistant.components.person.PersonStorageCollection:
[legend]
Collaboration diagram for homeassistant.components.person.PersonStorageCollection:
[legend]

Public Member Functions

None __init__ (self, Store store, collection.IDManager id_manager, collection.YamlCollection yaml_collection)
 
None async_load (self)
 

Public Attributes

 yaml_collection
 

Static Public Attributes

 CREATE_SCHEMA = vol.Schema(CREATE_FIELDS)
 
 UPDATE_SCHEMA = vol.Schema(UPDATE_FIELDS)
 

Private Member Functions

collection.SerializedStorageCollection|None _async_load_data (self)
 
bool _entity_registry_filter (self, er.EventEntityRegistryUpdatedData event_data)
 
None _entity_registry_updated (self, Event[er.EventEntityRegistryUpdatedData] event)
 
str _get_suggested_id (self, dict info)
 
dict _process_create_data (self, dict data)
 
dict _update_data (self, dict item, dict update_data)
 
None _validate_user_id (self, str user_id)
 

Detailed Description

Person collection stored in storage.

Definition at line 201 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.person.PersonStorageCollection.__init__ (   self,
Store  store,
collection.IDManager  id_manager,
collection.YamlCollection  yaml_collection 
)
Initialize a person storage collection.

Definition at line 207 of file __init__.py.

Member Function Documentation

◆ _async_load_data()

collection.SerializedStorageCollection | None homeassistant.components.person.PersonStorageCollection._async_load_data (   self)
private
Load the data.

A past bug caused onboarding to create invalid person objects.
This patches it up.

Definition at line 217 of file __init__.py.

◆ _entity_registry_filter()

bool homeassistant.components.person.PersonStorageCollection._entity_registry_filter (   self,
er.EventEntityRegistryUpdatedData   event_data 
)
private
Filter entity registry events.

Definition at line 244 of file __init__.py.

◆ _entity_registry_updated()

None homeassistant.components.person.PersonStorageCollection._entity_registry_updated (   self,
Event[er.EventEntityRegistryUpdatedData]   event 
)
private
Handle entity registry updated.

Definition at line 253 of file __init__.py.

◆ _get_suggested_id()

str homeassistant.components.person.PersonStorageCollection._get_suggested_id (   self,
dict  info 
)
private
Suggest an ID based on the config.

Definition at line 283 of file __init__.py.

◆ _process_create_data()

dict homeassistant.components.person.PersonStorageCollection._process_create_data (   self,
dict  data 
)
private
Validate the config is valid.

Definition at line 273 of file __init__.py.

◆ _update_data()

dict homeassistant.components.person.PersonStorageCollection._update_data (   self,
dict  item,
dict  update_data 
)
private
Return a new updated data object.

Definition at line 287 of file __init__.py.

◆ _validate_user_id()

None homeassistant.components.person.PersonStorageCollection._validate_user_id (   self,
str  user_id 
)
private
Validate the used user_id.

Definition at line 298 of file __init__.py.

◆ async_load()

None homeassistant.components.person.PersonStorageCollection.async_load (   self)
Load the Storage collection.

Definition at line 234 of file __init__.py.

Member Data Documentation

◆ CREATE_SCHEMA

homeassistant.components.person.PersonStorageCollection.CREATE_SCHEMA = vol.Schema(CREATE_FIELDS)
static

Definition at line 204 of file __init__.py.

◆ UPDATE_SCHEMA

homeassistant.components.person.PersonStorageCollection.UPDATE_SCHEMA = vol.Schema(UPDATE_FIELDS)
static

Definition at line 205 of file __init__.py.

◆ yaml_collection

homeassistant.components.person.PersonStorageCollection.yaml_collection

Definition at line 215 of file __init__.py.


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