Read a config file
ha_read_config_fileRead files from Home Assistant's config directory, including configuration.yaml, packages, and binary assets when base64 encoding is set. Use before editing so you can append and save changes back.
Instructions
Read a file under Home Assistant's config directory — configuration.yaml, a package, an included YAML file, or (with encoding='base64') a packaged binary asset such as an icon or a data file a custom integration ships.
Read this before writing it: ha_write_config_file replaces the whole file, so the way to add a section is read, append, write back. Requires the ha:files scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File relative to the config root, e.g. 'configuration.yaml'. | |
| encoding | No | 'utf8' (default) for text; 'base64' for a binary file, which otherwise fails with 'not UTF-8 text'. | |
| instance_id | No | Optional: the instance you mean (as listed by vomehome_list_instances). When given, the call is refused if this session is targeting a different home, instead of answering from it. |