Garage Door Automation: Need Help with Auto-Close Feature

Hello everyone, I’m trying to set up an automation to close my garage door if it’s left open for more than 5 minutes. I’ve read through several examples, but I’m still having trouble getting it to work properly. Here’s what I’ve done so far:

I have a cover entity for my garage door (cover.garage_door) and I’m using an automation that triggers when the door is opened. The trigger includes a delay of 5 minutes to give me time to close it manually if needed. If the door is still open after that time, I want it to close automatically.

Here’s the code I’m using:

yaml
alias: Door open
trigger:

  • platform: device
    device_id: 3ac70e1d66eec172cab97d178449cf36
    domain: cover
    entity_id: cover.garage_door
    type: opened
    for:
    hours: 0
    minutes: 5
    seconds: 0
    action:
  • service: notify.notify
    data:
    message: The garage door is open!
    actions:
    - service: cover.close_cover
    title: Close
    data: {}
    target:
    entity_id: cover.garage_door

The notification works perfectly, and I see the ‘Close’ button in the notification. However, when I tap the button, nothing happens. The garage door doesn’t close. I’m not sure if there’s an issue with the way I’ve structured the automation or if there’s a missing piece in the configuration.

I would really appreciate any guidance or suggestions on how to fix this. Maybe there’s a different way to structure the automation or a service I’m not aware of that can help with this. Thanks in advance for your help!