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

Public Member Functions

None __init__ (self, HomeAssistant hass, dict[str, Any]|None config)
 
def async_delete (self)
 
def async_get_info (self)
 
json_fragment async_json (self, bool force)
 
dict[str, Any] async_load (self, bool force)
 
def async_save (self, config)
 
str mode (self)
 
- Public Member Functions inherited from homeassistant.components.lovelace.dashboard.LovelaceConfig
None __init__ (self, HomeAssistant hass, str|None url_path, dict[str, Any]|None config)
 
str|None url_path (self)
 

Private Member Functions

json_fragment _async_build_json (self)
 
dict[str, Any] _load (self)
 

Private Attributes

 _data
 
 _json_config
 
 _store
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.components.lovelace.dashboard.LovelaceConfig
 config
 
 hass
 

Detailed Description

Class to handle Storage based Lovelace config.

Definition at line 90 of file dashboard.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.lovelace.dashboard.LovelaceStorage.__init__ (   self,
HomeAssistant  hass,
dict[str, Any] | None  config 
)
Initialize Lovelace config based on storage helper.

Definition at line 93 of file dashboard.py.

Member Function Documentation

◆ _async_build_json()

json_fragment homeassistant.components.lovelace.dashboard.LovelaceStorage._async_build_json (   self)
private
Build JSON representation of the config.

Definition at line 170 of file dashboard.py.

◆ _load()

dict[str, Any] homeassistant.components.lovelace.dashboard.LovelaceStorage._load (   self)
private
Load the config.

Definition at line 163 of file dashboard.py.

◆ async_delete()

def homeassistant.components.lovelace.dashboard.LovelaceStorage.async_delete (   self)
Delete config.

Reimplemented from homeassistant.components.lovelace.dashboard.LovelaceConfig.

Definition at line 153 of file dashboard.py.

◆ async_get_info()

def homeassistant.components.lovelace.dashboard.LovelaceStorage.async_get_info (   self)
Return the Lovelace storage info.

Reimplemented from homeassistant.components.lovelace.dashboard.LovelaceConfig.

Definition at line 115 of file dashboard.py.

◆ async_json()

json_fragment homeassistant.components.lovelace.dashboard.LovelaceStorage.async_json (   self,
bool  force 
)
Return JSON representation of the config.

Definition at line 133 of file dashboard.py.

◆ async_load()

dict[str, Any] homeassistant.components.lovelace.dashboard.LovelaceStorage.async_load (   self,
bool  force 
)
Load config.

Reimplemented from homeassistant.components.lovelace.dashboard.LovelaceConfig.

Definition at line 122 of file dashboard.py.

◆ async_save()

def homeassistant.components.lovelace.dashboard.LovelaceStorage.async_save (   self,
  config 
)
Save config.

Reimplemented from homeassistant.components.lovelace.dashboard.LovelaceConfig.

Definition at line 141 of file dashboard.py.

◆ mode()

str homeassistant.components.lovelace.dashboard.LovelaceStorage.mode (   self)
Return mode of the lovelace config.

Reimplemented from homeassistant.components.lovelace.dashboard.LovelaceConfig.

Definition at line 111 of file dashboard.py.

Member Data Documentation

◆ _data

homeassistant.components.lovelace.dashboard.LovelaceStorage._data
private

Definition at line 159 of file dashboard.py.

◆ _json_config

homeassistant.components.lovelace.dashboard.LovelaceStorage._json_config
private

Definition at line 149 of file dashboard.py.

◆ _store

homeassistant.components.lovelace.dashboard.LovelaceStorage._store
private

Definition at line 104 of file dashboard.py.


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