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

Public Member Functions

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

Public Attributes

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

Private Member Functions

tuple[dict[str, Any], json_fragment] _async_load_or_cached (self, bool force)
 
tuple[bool, dict[str, Any], json_fragment] _load_config (self, bool force)
 

Private Attributes

 _cache
 

Detailed Description

Class to handle YAML-based Lovelace config.

Definition at line 178 of file dashboard.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.lovelace.dashboard.LovelaceYAML.__init__ (   self,
HomeAssistant  hass,
str | None  url_path,
dict[str, Any] | None   config 
)
Initialize the YAML config.

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

Definition at line 181 of file dashboard.py.

Member Function Documentation

◆ _async_load_or_cached()

tuple[dict[str, Any], json_fragment] homeassistant.components.lovelace.dashboard.LovelaceYAML._async_load_or_cached (   self,
bool   force 
)
private
Load the config or return a cached version.

Definition at line 219 of file dashboard.py.

◆ _load_config()

tuple[bool, dict[str, Any], json_fragment] homeassistant.components.lovelace.dashboard.LovelaceYAML._load_config (   self,
bool  force 
)
private
Load the actual config.

Definition at line 230 of file dashboard.py.

◆ async_get_info()

def homeassistant.components.lovelace.dashboard.LovelaceYAML.async_get_info (   self)
Return the YAML storage mode.

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

Definition at line 197 of file dashboard.py.

◆ async_json()

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

Definition at line 214 of file dashboard.py.

◆ async_load()

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

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

Definition at line 209 of file dashboard.py.

◆ mode()

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

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

Definition at line 193 of file dashboard.py.

Member Data Documentation

◆ _cache

homeassistant.components.lovelace.dashboard.LovelaceYAML._cache
private

Definition at line 249 of file dashboard.py.

◆ path

homeassistant.components.lovelace.dashboard.LovelaceYAML.path

Definition at line 187 of file dashboard.py.


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