I have an automation that sends a notification to my iPhone when the door is left unlocked. It looks like this:
- id: '2681711295789'
alias: Front Door Lock Reminder
description: Send a notification if the front door has been left unlocked for 5
minutes.
trigger:
- entity_id: lock.front_door
for: 00:05:00
platform: state
to: unlocked
condition: []
action:
- data:
message: The front door has been unlocked for 5 minutes.
data:
push:
category: door
sound: "front_door_unlocked.wav"
apns_headers:
'apns-collapse-id': 'front_door_unlocked'
service: notify.mobile_app_my_iphone
The trouble is that I’d like to automatically dismiss that notification if the door is subsequently locked. I tried setting the message to delete_alert
(which can be used to silently change the badge on HA icon), but it didn’t work. Any ideas on how I can dismiss a notification when the condition is no longer present?
Thanks in advance to whomever can help!