How to automatically resume an alert after acknowledged?

Hello,

I have a door sensor. I set up an alert if it opened for too long. I can use the UI to toggle the alert to off if I intentionally leave it open. So far, everything works as expected.

What I wanted is after it is toggled off (silenced) , after certain time, say 15 minutes, it can send notification again. Does anyone know how to do it? This seems to be pretty basic. I must be missing something.

alert:
fence_side_door:
name: Fence side door is open.
done_message: Fence side door is closed.
entity_id: binary_sensor.fence_side_door_sensor_opening
state: “on”
repeat: 1
can_acknowledge: true
skip_first: false
notifiers:
- notify

The alert entity’s state should turn to off when it is acknowledged. You can set up an automation to trigger on the alert being “off” for your desired time and call the service alert.turn_on.

trigger:
  - platform: state
    to: "off"
    entity_id: alert.fence_side_door
    for: "00:15:00"
condition:
  - condition: state
    entity_id: binary_sensor.fence_side_door_sensor_opening
    state: "on"
action:
  - service: alert.turn_on
    target:
      entity_id: alert.fence_side_door

The condition isn’t strictly necessary, but there’s no harm in double checking and unnecessary notifications are annoying.

1 Like

Thanks. This worked perfectly!