auto_off time (optional)
Requires a trigger. After how much time the entity should turn off after it rendered ‘on’.
看文档说需要增加一项触发条件。
template:
- trigger:
- platform: state
entity_id: binary_sensor.fp1_new_presence
attribute: presence_event
binary_sensor:
- name: 移动感应fp1_new
device_class: motion
auto_off: 10
state: "{{ is_device_attr('binary_sensor.fp1_new_presence', 'presence_event', 'approach') }} "
不知道这个 presence_event 状态变化来触发行不行 |