要实现上图的提示很简单,只要把以下代码加到automation段里就ok了
#升级提示
- alias: Update notifications
initial_state: true
hide_entity: false
trigger:
- platform: state
entity_id: updater.updater
action:
- service: persistent_notification.create
data_template:
title: "新的HomeAssistant版本"
message: "Home Assistant{{ states.updater.updater.state }}请及时升级"
直接拷贝格式可能会乱,请注意缩进。 |