Seems strange that secrets cannot be used inside blueprints.
Currently (2022.11) it gives an error:
Log Details (ERROR)
Logger: homeassistant.config
Source: components/blueprint/models.py:221
First occurred: 05:40:42 (1 occurrences)
Last logged: 05:40:42
Invalid config for [automation]: Failed to load blueprint: Secrets not supported in this YAML file (See ?, line ?).
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/blueprint/models.py", line 213, in _load_blueprint
blueprint_data = yaml.load_yaml(self.blueprint_folder / blueprint_path)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 155, in load_yaml
return parse_yaml(conf_file, secrets)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 168, in parse_yaml
return _parse_yaml(SafeLoader, content, secrets)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 198, in _parse_yaml
yaml.load(content, Loader=lambda stream: loader(stream, secrets))
File "/usr/local/lib/python3.10/site-packages/yaml/__init__.py", line 81, in load
return loader.get_single_data()
File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 325, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 325, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 376, in secret_yaml
raise HomeAssistantError("Secrets not supported in this YAML file")
homeassistant.exceptions.HomeAssistantError: Secrets not supported in this YAML file
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 113, in _try_async_validate_config_item
validated_config = await async_validate_config_item(hass, config, full_config)
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 76, in async_validate_config_item
return await blueprints.async_inputs_from_config(config)
File "/usr/src/homeassistant/homeassistant/components/blueprint/models.py", line 302, in async_inputs_from_config
blueprint = await self.async_get_blueprint(bp_conf[CONF_PATH])
File "/usr/src/homeassistant/homeassistant/components/blueprint/models.py", line 280, in async_get_blueprint
blueprint = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/blueprint/models.py", line 221, in _load_blueprint
raise FailedToLoad(self.domain, blueprint_path, err) from err
homeassistant.components.blueprint.errors.FailedToLoad: Failed to load blueprint: Secrets not supported in this YAML file