Please see an example below on how to set up an IF-DO Automation
This example is using a "Magic Button" as the Trigger however the Trigger could be any device on your app.
Step 1 – Add an If Do Automation
Step 2 – Tap on Add Trigger
Step 3 – Select the device you would like to be the Magic Button from the list
Step 4 – Select Switch so you have the option for On or Off
Step 5 – Tap the box to change the state then tap on Add action
Step 6 – Select the devices you would like the Magic switch to control
Step 7 – This is the summary page where you can change the states of the devices and add time conditions
Step 8 – You can add the days and times you would like to Magic Button to operate
Step 9 – Insert automation name and press Done
Once the Automation is complete you will see an icon like this on the automation page.