<br />

> [!CAUTION]
> **Important:** All household members can see when these Routines run. Routines are for convenience only, not safety- or security-critical use cases. Do not create Routines that could result in injury or harm if they fail to start or stop. Routines can depend on working internet, Wi-Fi, and service availability from both Google and the third parties who manufacture the devices included in Routines. Routines may not always work, and Google is not responsible for any harm or losses incurred as a result of any failed Routines.

The Automation script language is based on YAML, and has a hierarchical schema.
The basic structure looks like this:

|---|---|
| [`metadata`](https://developers.home.google.com/automations/schema/metadata.md.txt) | *contains the name of the Automation and a description* |
| [`automations`](https://developers.home.google.com/automations/schema/automations.md.txt) | *defines the logic of the Automation* |
| ` starters ` | *defines the conditions which trigger the Automation* |
| ` condition ` | *defines additional conditions evaluated to start the Automation* |
| [`actions`](https://developers.home.google.com/automations/schema/automations.md.txt#actions) | *lists the actions to take* |

## Conventions

Each field is a key-value pair:

    <key>: <value> # <comments>

Where:

- `<key>` is a literal keyword

- `<value>` can be:

  - A primitive type: bool, number, string, time, etc.

  - A struct type: a collection of fields.

  - An array of the data type. For example, `- string` is an array of
    strings.

  - A reference to a data value, which is defined elsewhere. For example, in `device: $tv`, the `tv` is a variable, which refers to a device data.

- `<comments>` are used for any additional information for the author. The script
  engine ignores comments-they have no bearing on the operation of the script.