Restrict multiple alerts from motion sensor video doorbell

I’ve created an automation to alert my smart speakers if motion is detected on my driveway from my video doorbell sensor, however I want to restrict the number of notifications if I’m washing the car for example to one every 3 or 5 minutes. How can I do this in the yaml code below? Thanks for your help

alias: Front door
description: ""
  - type: motion
    platform: device
    device_id: 02e8c797aafd29aab94fd6e40ac75e8c
    entity_id: 7bf1c76898506648b631b923e7fe1d2d
    domain: binary_sensor
  - condition: time
    after: "07:00:00"
    before: "21:30:00"
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
  - service: notify.alexa_media
      message: "Motion detected at the front door. "
        type: tts
mode: single

Use a binary sensor then add a condition to check that sensor before alerting. I do this for auto-locking of doors. If I want to go in and out or having a party then I set the AutoLock toggle to off and the automations to auto lock doors check the toggle and stops.

Another simple way: add e.g. a 2 minute delay after the notification. Because the automation is Single mode, another cannot fire while delay has not passed yet. Or add a condition that says the automation has not run for 2 minutes.

Personally I have conditions the door must not have opened recently, or the shed door (because then it is us) or similar indications it is not a stranger.

Thanks - how would I add this?

Delay is an action you can add in the automation editor. In yaml, it looks like this:

  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0

Thanks bud

1 Like