I’ve been using Home Assistant for a while now and I’ve been thinking about a feature that could really enhance automation functionality for starters. Currently, I know it’s possible to achieve a cooldown period for automations using templates, but I believe it would be great to have this functionality integrated into the user interface.
What I have in mind is a “Preventive Execution Control” option. Essentially, this feature would allow us to specify a cooldown period for each automation, during which it wouldn’t trigger again after its last execution.
It would be nice if it could be added under the run mode settings,
or maybe just as a automation condition.
I’ve created a concept picture to give you an idea.
It’s even simpler than that, as long as your cool-down time is not too long and you can run the automation in single mode.
- alias: 'Doorbell Alert'
mode: single # <- set this mode
max_exceeded: silent # <- prevent logging warnings if waiting in the delay
trigger:
- platform: state
entity_id: binary_sensor.doorbell_button
from: 'off'
to: 'on'
action:
- service: button.press
target:
entity_id: button.doorbell_buzzer
- delay: 6 # <--- cool-down time in seconds