Açıklama
Otomasyon yapısı tüm otomasyon davranışlarını sağlar. Birlikte çalışan birkaç alt otomasyon içerebilir.
Alanlar
Anahtar | Tür | Açıklama |
---|---|---|
name
|
String |
Geliştiricilere referans olması için bu otomasyonun dahili adı. İsteğe bağlı Değişkene izin veriliyor. |
starters
|
[Başlangıç] |
Otomasyon başlatıcılar. Gerekli |
condition
|
Koşul |
Uygulanacak genel koşul. İsteğe bağlı |
actions
|
[İşlem] |
Otomasyon işlemleri. Gerekli |
Örnekler
Tek bir otomasyon kullanma: 18:00'de ışığı aç.
automations:
starters:
type: time.schedule
at: 6:00 pm
actions:
type: device.command.OnOff
devices: Light A - Living Room
on: true
Komut dosyasında birden fazla otomasyon kullanma:
- 18:00'de ışığı aç.
- Saat 23:00'te televizyonu kapat ve "uyku vakti" anons yap.
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: 11:00 pm
actions:
- type: device.command.OnOff
devices: TV - Living Room
on: false
- type: assistant.command.Broadcast
message: time to sleep