For example, trigger this automaton every Monday, Thursday and Saturday at 2am for example. Thank you
Hi there, Scheduler card should work for this purpose, also may need to install the custom scheduler component. Please have a look at this
I donât see how I can add that to an automation. Excuse my ignorance
Edit: I think I get it. Make the trigger a blank (dummy switch) and then schedule that switch. Correct?
Hey, Iâm not scheduling an enitity. Iâm trying to schedule an automation. Can that be done?
You dont need to use the dummy switch but can trigger the automation by calling the automation.trigger service from the scheduler card. It should work. If that doesnât work you can try dummy switch or even converting this automation to a script and calling that script.
With the Simple Scheduler you can directly call a service or script, whatever you want. So use he time / day to create a trigger and in the action either call a service (if you only need to do one thing) or call a script and have multiple actions in the script (if you need to do more things upon a trigger).
I donât see this option
Itâs basically the main screenshot you see in the Github repoâŠ
In the add-on you click the bit + button to create a new schedule, then select the days of the week you want something to turn on / off and the time of day:
Using the Automation Editor, create a Time Trigger for 02:00:00
and a Time Condition for Monday, Thursday, and Saturday.
Finish by adding whatever Action you require.
Thank you. What if I needed it to run multiple times per day
02:00:00, 04:00:00, 13:00:00
Would that do it?
Many options here, lots overcomplicating.
For your specific instance, I would:
Set up new automation
trigger on time at 2am
conditions for time, monday, thursday, and saturday on and others off
Actions whatever you are wanting to automate
If you wanted a bit more flexible solution, you could use a date/time helper, expose that to the front end, then use that helper as the automation trigger.
You can also trigger an automation from another automation, but that is not recommended in this case (too complicated to track).
No, it will be rejected.
Easiest way in the Automation Editor is to add each time in a separate Time Trigger.
If youâre feeling adventurous, you can switch the Automation Editor from visual mode to YAML mode and then compose a single Time Trigger containing multiple times:
Thatâs valid and will work but if you switch the Automation Editor back to visual mode it wonât know how to display the multiple timers in the Time Trigger (it will show none of them).
To switch between the modes, click the overflow menu (three vertical dots) in the upper right hand corner of the Trigger pane (select âEdit in visual editorâ or âEdit in YAMLâ).
Add each of the desired times as a separate trigger.
Think of triggers as anything that "starts " the automation, conditions as anything that you want to prevent the automation from continuing (excluding certain days in this example), and actions as the result of a successful automation running with conditions being met.
Amazing, Thanks for this. I work from home, and this worked great. I only wanted to make sure that all lights in the house are turned off by 9AM only during the week. I did not want to use a calendar for this. Triggers start at 9AM, but the conditions are Mon-Fri. If I needed various times for each day, options would be a good one to use. Loving it.
Amazing, Thanks for this. I work from home, and this worked great. I only wanted to make sure that all lights in the house are turned off by 9AM only during the week. I did not want to use a calendar for this. Triggers start at 9AM, but the conditions are Mon-Fri. If I needed various times for each day, options would be a good one to use. Loving it.
I know that this thread is a little old, but what would the most efficient way be to do exactly what youâre doing in the screenshot above, but to have the day of the week be a variable that the automation references, rather than something thatâs hard coded into it?
For example, so that you can do exactly what you are doing, but have the condition picking up the day of the week from somewhere thatâs set form a lovelace card.
Itâs relatively simple with times as there is a time helper just for times, but as far as I can tell the date\time helper only lets you select a specific date, not a day of the week.
I think that I can do this from the schedule helper but Iâd be interested to know if there is a neater way to do it, or if anyone has an example of it having been done that I can integrate into my own implementation.
I would have a look at the custom:schedyler-card
This should accomplish everything you want. It is an impressive integration.
Cheers
Another way to do it, is create a conditional of type âTemplateâ and create a code to do the validation.
Here is mine:
{% if now().weekday() >= 0 and now().weekday() <= 4 %}
true
{% else %}
false
{% endif %}
Perhaps we can simplify (nowadays) if we just use the condition time in an automation.
if:
- condition: time
weekday:
- sun
- sat
We also do not need to get confused if a week starts on a Monday or Sunday