Dear All, Let me explain my automation
I have a sonoff sv connected in parallel to my mechanical door bell switch. Sonoff sv runs on tasmota and integrated to HA. When anyone presses the bell switch, automation is triggered; i.e the HA Notify component takes a snapshot from my CCTV and sends an actionable notification to my phone, with the image of the person at the gate, and a button that allows me to open my gate.
Since it’s a bell switch, people tend to press multiple times, and this is triggering the automation multiple times and sending to my phone. My question is, how do i tell HA to run the automation only once and pause for 30sec and then allow again. My automation code is as below:
- id: '157300'
alias: Gate CCTV
description: ''
trigger:
- entity_id: switch.door_bell
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
data:
actions:
- action: open_gate
title: Open Gate
image: https://mycctv.image.url
message: Someone is at the door
service: notify.android