这是弹出提示的自动化
alias: 到家提示
trigger:
- platform: state
entity_id: device_tracker.xiao_ming
from: not_home
to: home
action:
- service: notify.mobile_app_iphone
data:
message: 到家了,需要开门吗?
data:
actions:
- identifier: KAIMEN
title: 开门
activationMode: background
authenticationRequired: true
destructive: true
icon: sfsymbols:checkmark.seal
- identifier: CANCEL
title: 取消
activationMode: background
authenticationRequired: true
destructive: false
icon: sfsymbols:xmark.seal
push:
sound: Alert_ActivityGoalAttained_Haptic.caf
这是联动开门的自动化:
alias: 开车库门
trigger:
- platform: event
event_type: ios.notification_action_fired
event_data:
actionName: KAIMEN
action:
- service: cover.open_cover
entity_id: cover.che_ku
|