你可以在 automation 呼叫其他 script
automation:
- alias: "turn on script"
trigger:
... ...
condition:
... ...
action:
- service: script.turn_on
data:
entity_id:
- script.xxxxxx
也可以在 automation 呼叫其他 switch
automation:
- alias: "turn on some switch"
trigger:
... ...
action:
service: switch.turn_on
entity_id: switch.xxxxxx
當然, 在 script 中也可以呼叫 script
script:
call_other_script:
sequence:
- service: script.xxx
- service: script.yyy
- service: script.zzz
|