> Documentation index: https://developers.home.google.com/automations/schema/llms.txt

<br />

## Description

The Automation Struct provides all the automation behaviors. It may contain several child automations which work together.

## Fields

| Key | Type | Description |
|---|---|---|
| `name` | [String](https://developers.home.google.com/automations/schema/basics.md.txt#string) | An internal name of this automation for developers' reference. Optional |
| `starters` | \[[Starter](https://developers.home.google.com/automations/schema/reference/standard/starter.md.txt)\] | The automation starters. Required |
| `condition` | [Condition](https://developers.home.google.com/automations/schema/reference/standard/condition.md.txt) | The global condition to apply. Optional |
| `actions` | \[[Action](https://developers.home.google.com/automations/schema/reference/standard/action.md.txt)\] | The automation actions. Required |

## Examples

Use a single automation: At 6 pm, turn on light.

```yaml
automations:
  starters:
    type: time.schedule
    at: 6:00 pm
  actions:
    type: device.command.OnOff
    devices: Light A - Living Room
    on: true
```

Use multiple automations in a script:
\* At 6pm, turn on light.
\* At 11pm, turn off TV and broadcast "time to sleep"

```yaml
automations:
- name: At 6pm, turn on light.
  starters:
    type: time.schedule
    at: 6:00 pm
  actions:
    type: device.command.OnOff
    devices: Light A - Living Room
    on: true
- name: At 11pm, turn off TV and broadcast "time to sleep"
  starters:
    type: time.schedule
    at: 6:00 pm
  actions:
  - type: device.command.OnOff
    devices: TV - Living Room
    on: false
  - type: assistant.command.Broadcast
    message: time to sleep
```