如下,怎么设置达到触发条件后,每天只触发一次,只在第一次触发,即使后面达到了,也不触发!就是每天就一次。
alias: 离家模式下扫地机全屋自动托管模式(离家距离)
description: ""
trigger:
- platform: numeric_state
entity_id:
- sensor.dis_chaohome
- sensor.dis_wenhome
above: 2.5
condition:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.dis_chaohome
above: 2.5
- condition: numeric_state
entity_id: sensor.dis_wenhome
above: 2.5
action:
- service: notify.wework
data:
message: >-
扫地机开启托管模式,将根据家中情况自主选择清扫模式,现在开始清扫!{{'\n'}}{{ now().strftime('%Y-%m-%d
%H:%M:%S') }}
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: counter.my_custom_counter
state: "0"
- condition: state
entity_id: counter.my_custom_counter
state: "1"
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: >-
input_boolean.quan_wu_qing_sao_xian_sao_hou_tuo_bu_tuo_zhu_wo_ci_wo_shu_fang
- conditions:
- condition: state
entity_id: counter.my_custom_counter
state: "2"
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.ke_ting_sao_di_ji
mode: single
|