Need some help with the alert component

Here’s what I want to do:

  • After the garage door has been open for 30 minutes, I want to send an alert that tells me how long the door has been open. I also want to send the same alert every 30 minutes until it is closed.
  • I want another alert when the door is finally closed(assuming it has been open at least 30 minutes).

Is this possible to do using the alert component? I have something setup using scripts and automation, but I would rather do it using this component since that would be a lot simpler. Any help would be appreciated.

That is not possible with the current alert component :slight_smile:

~Cheers

It looks like the first part is possible. I’m starting to think the second part is not. Here’s the yaml code to do the first part:

alert:

garage_door:
  name: 'The garage door has been open for "{{ relative_time(states.cover.garage_door.last_changed) }}". Message sent at "{{now().strftime("%H:%M:%S %Y-%m-%d")}}"'
  entity_id: cover.garage_door
  state: 'open'  
  repeat:
    - 30
  can_acknowledge: True  
  skip_first: True  
  notifiers:
    - telegramBot

Ah my bad I was under the assumption your sensor also reports open states if it already is open. Because if so this would not work. The second part MAY be possible with a template sensor that you use for the alert instead of the cover.garage_door.

If you get it to work pleas let us know :slight_smile:

~Cheers

I’m not sure what you mean. The sensor does report open states. And this works just fine.

And for my second part, I think I will just put a feature request in for it. I’m thinking I’m not the only one that wants a notification when things go back to normal.

1 Like