Repeat notify not working

I have the following alert for my garadget.
Yet it only notifies me two times. Once when the door is open and once when it’s closed.
It doesn’t matter if I leave the door open for 60 minutes?? What do I have to do for an alert at 15 minutes, 30 etc

  garage_door_open_long:
   name: Garage Door is still open!
   done_message: Garage is closed
   entity_id: sensor.garage_door_status
   state: 'open'   # Optional, 'on' is the default value
   repeat: 
    - 15
    - 30
    - 60
   can_acknowledge: false  # Optional, default is true
   skip_first: false  # Optional, false is the default
   notifiers:
     - mypushbullet

Could you please do two things:

  1. Format the code properly so that it can be verified here.
  2. Check in the dev tools that the status for your sensor.garage_door_status is indeed ‘open’ and ‘closed’ and not ‘on’ and ‘off’ or something else.

BTW:
It does not need to be under automation, the alert component stands all by itself.

Yes the states are open or closed. The config check seems to go okay.

Here is my automation that uses pushbullet for the same thing as what you are wanting:

- id: n_gd_open_notify
  alias: 'North GD Open Notification'
  trigger:
    - platform: state
      entity_id: sensor.n_gd_pos_template
      to: 'Open'
      for:
        minutes: 30
    - platform: event
      event_type: timer.finished
      event_data:
        entity_id: timer.north_garage_door
  condition:
    condition: state
    entity_id: sensor.n_gd_pos_template
    state: 'Open'
  action:
    - service: notify.pushbullet_notify
      data:
        message: 'The North Garage Door Is Still Open'
    - service: timer.start
      entity_id: timer.north_garage_door

With the above automation I just created a 30 minute timer to keep it running.

north_garage_door:
  duration: '00:30:00'

it alerts me every 30 minutes. If you want a different time just change the timer values.

Thanks, @hotdogwater!

Here’s my take on it:

  1. Your alert needs to start with alert: in column 0 - just like you had it before.
  2. The name of the alert garage_door_open_long needs to be intended by 2 spaces, i.e. start in column 2 - think this is the case in your code.
  3. The line starting with name: needs to be intended another 2 spaces, it looks like your’s is only 1 space further in.
  4. same for the lines after repeat, they also seem to be intended one space further rather than 2.

I should probably look like this then:

alert:
  garage_door_open_long:
    name: Garage Door is still open!
    done_message: Garage is closed
    entity_id: sensor.garage_door_status
    state: 'open'   # Optional, 'on' is the default value
    repeat: 
      - 15
      - 30
      - 60
    can_acknowledge: false  # Optional, default is true
    skip_first: false  # Optional, false is the default
    notifiers:
      - mypushbullet

And, just in case I miscounted some of the spaces, here is my working version as an example:

alert:
  garage_door_open_long:
    name: Garage Door is still open!
    entity_id: binary_sensor.garage_door_sensor
    state: 'off'   # Optional, 'on' is the default value
    repeat: 5
    can_acknowledge: true  # Optional, default is true
    skip_first: true  # Optional, false is the default
    notifiers:
      - mypushbullet

Thanks @finity and @chairstacker. I tried several different forms of the alert component and could not get it to repeat at all. The solution @finity had works great though and I learned timers, thanks. Also changed my garage senors to binary senors, on and off just fits with alot of things.

Just wanted to point out that using the alert component has the advantage that you can easily get a switch to dismiss the alert in case you don’t want to / need to get the notifications for a while e.g. because you’ve left it open on purpose.

Either way: good that you got it to work :+1:

That’s easy enough to do with my code as well. all you need to do is put in an input_boolean in the conditions that will disable the automation when turned on.

I actually may do that eventually but right now I haven’t seen the need for it. Getting a pushbullet notification every half hour isn’t too distracting.

just to update this thread. I switched from hassbian to hassio and my alert components work fine now.
But @finity I still like the timer based alerts.

Thanks. :grinning:

Would I be able to say only alert during this time period by adding this?

  • condition: time
    after: ‘20:00:00’
    before: ‘23:59:00’

I’m pretty sure that would work. As long as you have the rest of the condition statement included.