스크립트

설명

최상위 스크립트

입력란

유형 설명
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