Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.lovelace.resources.ResourceStorageCollection Class Reference
Inheritance diagram for homeassistant.components.lovelace.resources.ResourceStorageCollection:
[legend]
Collaboration diagram for homeassistant.components.lovelace.resources.ResourceStorageCollection:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, LovelaceConfig ll_config)
 
def async_get_info (self)
 

Public Attributes

 ll_config
 
 loaded
 

Static Public Attributes

 CREATE_SCHEMA = vol.Schema(RESOURCE_CREATE_FIELDS)
 
bool loaded = False
 
 UPDATE_SCHEMA = vol.Schema(RESOURCE_UPDATE_FIELDS)
 

Private Member Functions

collection.SerializedStorageCollection|None _async_load_data (self)
 
str _get_suggested_id (self, dict info)
 
dict _process_create_data (self, dict data)
 
dict _update_data (self, dict item, dict update_data)
 

Detailed Description

Collection to store resources.

Definition at line 51 of file resources.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.lovelace.resources.ResourceStorageCollection.__init__ (   self,
HomeAssistant  hass,
LovelaceConfig  ll_config 
)
Initialize the storage collection.

Definition at line 58 of file resources.py.

Member Function Documentation

◆ _async_load_data()

collection.SerializedStorageCollection | None homeassistant.components.lovelace.resources.ResourceStorageCollection._async_load_data (   self)
private
Load the data.

Definition at line 73 of file resources.py.

◆ _get_suggested_id()

str homeassistant.components.lovelace.resources.ResourceStorageCollection._get_suggested_id (   self,
dict  info 
)
private
Return unique ID.

Definition at line 115 of file resources.py.

◆ _process_create_data()

dict homeassistant.components.lovelace.resources.ResourceStorageCollection._process_create_data (   self,
dict  data 
)
private
Validate the config is valid.

Definition at line 108 of file resources.py.

◆ _update_data()

dict homeassistant.components.lovelace.resources.ResourceStorageCollection._update_data (   self,
dict  item,
dict  update_data 
)
private
Return a new updated data object.

Definition at line 119 of file resources.py.

◆ async_get_info()

def homeassistant.components.lovelace.resources.ResourceStorageCollection.async_get_info (   self)
Return the resources info for YAML mode.

Definition at line 65 of file resources.py.

Member Data Documentation

◆ CREATE_SCHEMA

homeassistant.components.lovelace.resources.ResourceStorageCollection.CREATE_SCHEMA = vol.Schema(RESOURCE_CREATE_FIELDS)
static

Definition at line 55 of file resources.py.

◆ ll_config

homeassistant.components.lovelace.resources.ResourceStorageCollection.ll_config

Definition at line 63 of file resources.py.

◆ loaded [1/2]

bool homeassistant.components.lovelace.resources.ResourceStorageCollection.loaded = False
static

Definition at line 54 of file resources.py.

◆ loaded [2/2]

homeassistant.components.lovelace.resources.ResourceStorageCollection.loaded

Definition at line 69 of file resources.py.

◆ UPDATE_SCHEMA

homeassistant.components.lovelace.resources.ResourceStorageCollection.UPDATE_SCHEMA = vol.Schema(RESOURCE_UPDATE_FIELDS)
static

Definition at line 56 of file resources.py.


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