スクリプト

説明

トップレベルのスクリプト。

フィールド

キー タイプ 説明
metadata メタデータ

名前や説明など、スクリプトのメタデータを提供します。

必須

automations [自動化]

オートメーションのリストを指定します。

必須

スイッチでライトを制御する簡単なスクリプト

metadata:
  name: Turn on light with switch
  description: Basic example of turning on a light with another switch.

automations:
  starters:
    type: device.state.OnOff
    device: Office Switch - Office
    state: on
    is: true
  actions:
  - type: device.command.OnOff
    devices:
    - Christmas lights - Living Room
    on: true