设置了一个自动化 家里一共五扇门安装了门窗传感器,设置了自动化任意一扇开启超过15min就会提醒,请问如何在执行动作action--persistent_notification.create提醒的message中 体现出是那扇门开启超时了
目前代码如下
alias: notify
description: ''
trigger:
- type: opened
platform: device
device_id: 158dxxxxxxxxxxxxx
entity_id: binary_sensor.door_window_sensor_158dxxxxxxxxxxxxx
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
- type: opened
platform: device
device_id: binary_sensor.door_window_sensor_158dxxxxxxxxxxxxx
entity_id: 158dxxxxxxxxxxxxx
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
- type: opened
platform: device
device_id: 158dxxxxxxxxxxxxx
entity_id: binary_sensor.door_window_sensor_158dxxxxxxxxxxxxx
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
- type: opened
platform: device
device_id: 158dxxxxxxxxxxxxx
entity_id: binary_sensor.door_window_sensor_158dxxxxxxxxxxxxx
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
- type: opened
platform: device
device_id: 158dxxxxxxxxxxxxx
entity_id: binary_sensor.door_window_sensor_158dxxxxxxxxxxxxx
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
condition:
- after: '08:00:00'
before: '20:00:00'
condition: time
action:
- data:
message: 门未关超过15min 请注意查看
service: persistent_notification.create
mode: single
|