automation:
- alias: "xxg_new_message"
initial_state: true #是否开机激活
hide_entity: false #是否在前台UI隐藏
trigger:
platform: template
value_template: "{{ '分钟' in states.sensor.xxg_message_time.state }}"
action:
- service: notify.ios_6s
data_template:
title: '新消息'
message: "XXX"
# - service: persistent_notification.create
# data_template:
# title: '新消息通知'
# message: "{{ states.sensor.xxg_message_title.state }},{{ states.sensor.xxg_message_price.state }}\n详情:{{ states.sensor.xxg_message_detail.state }}"
- service: tts.baidu_say
data_template:
entity_id: media_player.kodi,media_player.mpd
message: >
详情:{{ states.sensor.xxg_message_detail.state }}
- service: notify.smtpqq
data_template:
title: >
{{ states.sensor.xxg_message_title.state }}
message: 信息港有新消息!
|