action里面加delay试一下呗,感觉延时三个小时不是太靠谱。
加上TTS更好。
我蛋疼还特意编了段不知道行不行的代码:
- alias: milk
initial_state: true
hide_entity: true
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_xxx
click_type: single
condition:
- condition: time
after: '09:00:00'
before: '18:00:00'
action:
- service: notify.ios_iphone
data:
title: "媳妇儿,求你件事儿。"
message: "{{states('sensor.time')}}"
- delay:
minutes: 180
- service: tts.baidu_say
data_template:
entity_id: media_player.xxx
message: >
"我求你的事情,现在是时候去干了,去给孩子喂奶,拜托拜托。"
cache: false
|