Automation "next execution"

Hello,

I don’t know if it’s exists, but I’ve a suggestion for the automation.
It should be nice if we can have a kind of “don’t execute until XX” when an automation has been triggered.

Let me explain my use case: I want to have one scene triggered during the morning, not every time the “triggers” are triggered.

It will be nice to have a field “Next execution: immediate / +1 min / +2min / … / tomorrow”
I’m not a python dev, so I don’t even know how I can build this :smile:

is it not just a case of including a time based condition to your automation?

Not exactly, it’s like I’ve a sensor on a door, and when I open the door, a camera is recording for X seconds and I want to “delay” the next automation trigger of 1 minute.
Or another example: you want to trigger an automation/scene when the first people leave the house, but you want this executed once per day our per hour.

It’s more like the automation is in “paused” during X minutes.

you could do that with another automation which is triggered by the first automation having fired, then calls the service: automation.turn_off then waits for your desired duration, then calls automation.turn_on (using the entity ID of your automation to delay) to allow it to fire again later

In fact, I can do that, but I think to have it native would be nice :wink:

fair enough :slight_smile:

I THINK i have seen something containing some wait functionality. I even think it was wait until “state” is true.
I will try to search through my history, and get back to you, if I find something :slight_smile:

https://www.home-assistant.io/docs/scripts/ go to the “Wait” section. Might be useful

Dont know if I understood you correctly, but you could use days and times condtions like this

  • service_template: ‘{% if now().weekday() in (0,1,2,3,4,5,6) and now().hour >=21 and now().hour < 22 %} homeassistant.turn_off {% endif %}’
    data_template:
    entity_id: switch.curtains