FAQ - How to run the automation once a month
You can run the automation once a month by adding in a ‘Global Condition’. Below are the steps on how to do this. There are 2 examples, choose the one you would like to use.
EXAMPLE 1: This will run it once a month but you can’t use the ‘Button Helper’ follow these steps.
-
In global conditions click ‘+ ADD CONDITION’
-
In the search start typing ‘template’. Template will pop up and select it.
-
Copy and pase the code provide below.
-
‘0’ = Monday so if you would like to run it on Friday then replace the ‘0’ with ‘4’.
-
‘7’ is for the first week of the month.
{{ now().weekday() == 0 and now().day <= 7 }}
-
Then enable time, set the time you would like and because we used ‘0’ = Monday we also selected Monday.
-
Click save and your done
. The automation should only run on the first Monday of the month.
EXAMPLE 2: If you would like to still be able to use the ‘Button Helper’ and run it once a month follow these steps.
-
In global conditions click ‘+ ADD BUILDING BLOCK’
-
Then select ‘Or’.
-
Click the 3 dots and ‘Edit in YAML’
-
Copy the code below and paste it in. Change it to the day you would like
-
‘0’ = Monday so if you would like to run it on Friday then replace the ‘0’ with ‘4’.
-
‘7’ is for the first week of the month.
condition: or
conditions:
- condition: trigger
id: t0
- condition: template
value_template: "{{ now().weekday() == 0 and now().day <= 7}}"
-
Then enable time, set the time you would like and because we used ‘0’ = Monday we also selected Monday.
-
Click save and your done
. The automation should only run on the first Monday of the month and allow you to also use the ‘Button Helper’.
Enjoy
Blacky
Back to FAQ: Click Here