How to set how many times a task should run?

Hi, if someone could help me: how to set how many times a task should run? The goal is to activate the morning greeting and turn on the radio, change the home temperature, etc. only once a day during the morning hours on weekdays. The trigger for this event is the motion sensor in the kitchen. Currently, the task runs normally, but whenever motion is detected within the specified time interval, the task is reactivated. What I would like: the command to run only once a day

Translated with DeepL.com (free version)

Create an input_boolean.
In your task, set the condition the input_boolean must be on
At the end of your task, set the input_boolean to off

Create a second automation to run at midnight that sets the input_boolean to on.

I know some people will violently oppose what I am about to say because it is not considered best practice by them, but you do not need the input boolean if you simply disable/enable the automation itself using automation.turn_off and automation.turn_on services.

No strong feelings about this… :grin: but how do you enable the automation again? It can’t enable itself, obviously. In fact, I’m not sure it can disable itself either, can it? All gets very complicated.

And conceptually (so to speak) you’re doing much the same thing as when you add an input_boolean condition… :thinking: