Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.icon._IconsCache Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass)
 
dict[str, dict[str, Any]] async_fetch (self, str category, set[str] components)
 

Private Member Functions

None _async_load (self, set[str] components)
 
None _build_category_cache (self, set[str] components, dict[str, dict[str, Any]] icons)
 

Private Attributes

 _hass
 
 _lock
 

Static Private Attributes

tuple __slots__ = ("_hass", "_loaded", "_cache", "_lock")
 

Detailed Description

Cache for icons.

Definition at line 78 of file icon.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.icon._IconsCache.__init__ (   self,
HomeAssistant  hass 
)
Initialize the cache.

Definition at line 83 of file icon.py.

Member Function Documentation

◆ _async_load()

None homeassistant.helpers.icon._IconsCache._async_load (   self,
set[str]  components 
)
private
Populate the cache for a given set of components.

Definition at line 111 of file icon.py.

◆ _build_category_cache()

None homeassistant.helpers.icon._IconsCache._build_category_cache (   self,
set[str]  components,
dict[str, dict[str, Any]]  icons 
)
private
Extract resources into the cache.

Definition at line 128 of file icon.py.

◆ async_fetch()

dict[str, dict[str, Any]] homeassistant.helpers.icon._IconsCache.async_fetch (   self,
str  category,
set[str]  components 
)
Load resources into the cache.

Definition at line 90 of file icon.py.

Member Data Documentation

◆ __slots__

tuple homeassistant.helpers.icon._IconsCache.__slots__ = ("_hass", "_loaded", "_cache", "_lock")
staticprivate

Definition at line 81 of file icon.py.

◆ _hass

homeassistant.helpers.icon._IconsCache._hass
private

Definition at line 85 of file icon.py.

◆ _lock

homeassistant.helpers.icon._IconsCache._lock
private

Definition at line 88 of file icon.py.


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