List config files
files_list_config_filesList YAML, JSON, or TXT config files under the Home Assistant /config directory to discover existing files before reading or writing them. Skips secrets and .storage.
Instructions
Recursively list config files with allowed extensions under /config.
Resolves subdirectory (default the config root) under HA_CONFIG_PATH,
recurses with Path.rglob('*'), and returns config-root-relative paths
for files whose extension is in .yaml/.yml/.json/.txt, skipping
secrets.yaml and .storage/.
Use when: discovering which config files exist before reading or
writing one.
Not for: reading a file's content once you have its path — use
files_read_config_file.
Returns: list[str] of config-root-relative file paths.
Limits: output can be large for the /config root; a subdirectory that
resolves (after following symlinks) outside /config returns an empty
list instead of listing files outside the config directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subdirectory | No | Subdirectory relative to the HA config root to list, e.g. 'packages'. Omit (default '') to list from the config root. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |