这已经是最简单自动化了,看文档、看别人的示例,最重要的自己要勇于尝试。
替你写了个例子,还不行的话我也不知道怎么帮你了
alias: welcomeLight
description: '有人开灯5分钟无人关灯'
trigger:
- platform: state
entity_id: binary_sensor.motion_xuanguan
from: 'off'
to: 'on'
condition: []
action:
- type: turn_on
device_id: xxxxxxxxxxx
entity_id: light.xuanguan
domain: light
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- type: turn_off
device_id: xxxxxxxxxxx
entity_id: light.xuanguan
domain: light
mode: restart
|