スクリプト

説明

最上位のスクリプト。

フィールド

キー 説明
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