以下是我的 每2小时进行的喝水提醒 , 如果喝了的话,可以直接记录每日喝水量, 没喝的话,可以推迟10分钟继续提醒。请参考。
- id: '1580305676205'
alias: 喝水提醒
description: ''
trigger:
- hours: /2
platform: time_pattern
condition:
- after: 08:00
before: '21:00'
condition: time
action:
- data:
data:
attachment:
content-type: jpg
hide-thumbnail: false
url: https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1580364980808&di=583f3647d420a803fe0309dcb574976f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F10175732727%2F1000.jpg
push:
badge: 1
category: drink_water
sound: 喝水提醒.wav
subtitle: 定时补充水分,能增强身体免疫力。
message: 现在就喝水吗?{{ '\ud83d\ude02\uD83D\uDE03' }}
title: 喝水时间到了。
service: notify.mobile_app_iphone11
ios:
push:
categories:
- name: 喝水操作
identifier: 'drink_water'
actions:
- identifier: 'DELAY'
title: '10分钟后再提醒我'
activationMode: 'background'
authenticationRequired: false
destructive: true
behavior: 'default'
- identifier: 'DRINK_HALF'
title: '喝了半杯(约150ml)'
activationMode: 'background'
authenticationRequired: true
destructive: false
behavior: 'default'
- identifier: 'DRINK_ALL'
title: '喝了一杯(约300ml)'
activationMode: 'background'
authenticationRequired: true
destructive: false
behavior: 'default'
- id: '1583813367980'
alias: 按钮动作:喝了半杯水
description: ''
trigger:
- event_data:
actionName: DRINK_HALF
event_type: ios.notification_action_fired
platform: event
condition: []
action:
- data: {}
entity_id: counter.drinkwater
service: counter.increment
- id: '1583821128260'
alias: 按钮动作:喝了一杯水
description: ''
trigger:
- event_data:
actionName: DRINK_HALF
event_type: ios.notification_action_fired
platform: event
condition: []
action:
- data: {}
entity_id: counter.drinkwater
service: counter.increment
- data: {}
entity_id: counter.drinkwater
service: counter.increment
- id: '1567021505313'
alias: 按钮动作:延迟十分钟提醒喝水
description: Delay Drink Water
trigger:
- event_data:
actionName: DELAY
event_type: ios.notification_action_fired
platform: event
condition: []
action:
- delay: 00:10:00
- alias: ''
data: {}
entity_id: automation.he_shui_ti_xing
service: automation.trigger
|