Add Once a day automation option

Please add a GUI-Function to use an automation only once a day.

Hi Jeff,

What do you mean?
Once a day like, at 6am every day? (that already exists)
Or ensure that it will run only once? (that you can achieve by setting an input_boolean but could be included in what you would like)

Yes i meant only once a day.

More clear.
Don’t forget to vote for your feature.

Add the following Template Condition to your automation:

condition:
  - condition: template
    value_template: "{{ this.attributes.last_triggered < today_at() }}"

If you have a new automation that has never been triggered, the last_triggered attribute won’t exist so this version of the template is designed to gracefully handle that situation.

condition:
  - condition: template
    value_template: "{{ this.attributes.last_triggered | default(as_datetime(0), true) < today_at() }}"

EDIT

Correction.

3 Likes