Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.blueprint.models.DomainBlueprints Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, str domain, logging.Logger logger, Callable[[HomeAssistant, str], bool] blueprint_in_use, Callable[[HomeAssistant, str], Awaitable[None]] reload_blueprint_consumers, Callable[[Any], Any] blueprint_schema)
 
bool async_add_blueprint (self, Blueprint blueprint, str blueprint_path, bool allow_override=False)
 
Blueprint async_get_blueprint (self, str blueprint_path)
 
dict[str, Blueprint|BlueprintException|None] async_get_blueprints (self)
 
BlueprintInputs async_inputs_from_config (self, dict config_with_blueprint)
 
None async_populate (self)
 
None async_remove_blueprint (self, str blueprint_path)
 
None async_reset_cache (self)
 
pathlib.Path blueprint_folder (self)
 

Public Attributes

 domain
 
 hass
 
 logger
 

Private Member Functions

bool _create_file (self, Blueprint blueprint, str blueprint_path, bool allow_override)
 
Blueprint _load_blueprint (self, str blueprint_path)
 
dict[str, Blueprint|BlueprintException|None] _load_blueprints (self)
 

Private Attributes

 _blueprint_in_use
 
 _blueprint_schema
 
 _blueprints
 
 _load_lock
 
 _reload_blueprint_consumers
 

Detailed Description

Blueprints for a specific domain.

Definition at line 191 of file models.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.blueprint.models.DomainBlueprints.__init__ (   self,
HomeAssistant  hass,
str  domain,
logging.Logger  logger,
Callable[[HomeAssistant, str], bool]  blueprint_in_use,
Callable[[HomeAssistant, str], Awaitable[None]]  reload_blueprint_consumers,
Callable[[Any], Any]  blueprint_schema 
)
Initialize a domain blueprints instance.

Definition at line 194 of file models.py.

Member Function Documentation

◆ _create_file()

bool homeassistant.components.blueprint.models.DomainBlueprints._create_file (   self,
Blueprint  blueprint,
str  blueprint_path,
bool   allow_override 
)
private
Create blueprint file.

Returns true if the action overrides an existing blueprint.

Definition at line 332 of file models.py.

◆ _load_blueprint()

Blueprint homeassistant.components.blueprint.models.DomainBlueprints._load_blueprint (   self,
str  blueprint_path 
)
private
Load a blueprint.

Definition at line 225 of file models.py.

◆ _load_blueprints()

dict[str, Blueprint | BlueprintException | None] homeassistant.components.blueprint.models.DomainBlueprints._load_blueprints (   self)
private
Load all the blueprints.

Definition at line 245 of file models.py.

◆ async_add_blueprint()

bool homeassistant.components.blueprint.models.DomainBlueprints.async_add_blueprint (   self,
Blueprint  blueprint,
str  blueprint_path,
bool   allow_override = False 
)
Add a blueprint.

Definition at line 352 of file models.py.

◆ async_get_blueprint()

Blueprint homeassistant.components.blueprint.models.DomainBlueprints.async_get_blueprint (   self,
str  blueprint_path 
)
Get a blueprint.

Definition at line 275 of file models.py.

◆ async_get_blueprints()

dict[str, Blueprint | BlueprintException | None] homeassistant.components.blueprint.models.DomainBlueprints.async_get_blueprints (   self)
Get all the blueprints.

Definition at line 268 of file models.py.

◆ async_inputs_from_config()

BlueprintInputs homeassistant.components.blueprint.models.DomainBlueprints.async_inputs_from_config (   self,
dict   config_with_blueprint 
)
Process a blueprint config.

Definition at line 307 of file models.py.

◆ async_populate()

None homeassistant.components.blueprint.models.DomainBlueprints.async_populate (   self)
Create folder if it doesn't exist and populate with examples.

Definition at line 367 of file models.py.

◆ async_remove_blueprint()

None homeassistant.components.blueprint.models.DomainBlueprints.async_remove_blueprint (   self,
str  blueprint_path 
)
Remove a blueprint file.

Definition at line 324 of file models.py.

◆ async_reset_cache()

None homeassistant.components.blueprint.models.DomainBlueprints.async_reset_cache (   self)
Reset the blueprint cache.

Definition at line 220 of file models.py.

◆ blueprint_folder()

pathlib.Path homeassistant.components.blueprint.models.DomainBlueprints.blueprint_folder (   self)
Return the blueprint folder.

Definition at line 216 of file models.py.

Member Data Documentation

◆ _blueprint_in_use

homeassistant.components.blueprint.models.DomainBlueprints._blueprint_in_use
private

Definition at line 207 of file models.py.

◆ _blueprint_schema

homeassistant.components.blueprint.models.DomainBlueprints._blueprint_schema
private

Definition at line 211 of file models.py.

◆ _blueprints

homeassistant.components.blueprint.models.DomainBlueprints._blueprints
private

Definition at line 223 of file models.py.

◆ _load_lock

homeassistant.components.blueprint.models.DomainBlueprints._load_lock
private

Definition at line 210 of file models.py.

◆ _reload_blueprint_consumers

homeassistant.components.blueprint.models.DomainBlueprints._reload_blueprint_consumers
private

Definition at line 208 of file models.py.

◆ domain

homeassistant.components.blueprint.models.DomainBlueprints.domain

Definition at line 205 of file models.py.

◆ hass

homeassistant.components.blueprint.models.DomainBlueprints.hass

Definition at line 204 of file models.py.

◆ logger

homeassistant.components.blueprint.models.DomainBlueprints.logger

Definition at line 206 of file models.py.


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