On every iPhone running iOS 13 or higher you can set automation using the Shortcuts app to trigger an action at sunrise or sunset. This is very useful for periodical tasks like playing music, setting alarms and other tasks. You can trigger these actions based on the time of day, your location, the action of an accessory or activation of a sensor.
Here is a guide on how to Set an Automation in your iPhone.
Step 1: Open the Shortcuts app. If you are unable to find the icon swipe downward with one finger from the middle of the screen. Type ‘Shortcuts’ in the search bar and then tap on the ‘Shortcuts icon’ when it appears.
Step 2: Tap on ‘Automation’. If this is the first automation on your device tap ‘Create Personal Automation.’
If you have set up automations before and want to create a new automation then tap on the plus sign (+) and then tap ‘Create Personal Automation’.
Step 3: On the ‘New Automation’ menu click on ‘Time of Day.’
Now, you can select whether to trigger the automation at ‘Sunrise’ or ‘Sunset’.
Step 4: Next you can select a time offset such as ’30 Minutes Before Sunset’ or ‘At Sunset’. The same thing can be done to the sunrise options. Choose your preferred option and then tap ‘Done’.
Step 5: After you’ve selected ‘Sunrise’ or ‘Sunset’. Select if you want the action to repeat ‘Daily’, ‘Weekly’ or ‘Monthly’ . Select your preference. If you want an action to occur every day at sunrise or sunset then select ‘Daily.’
Step 6: Tap ‘Next’ to go to the ‘Actions’ menu. Here you can define what you want to happen at sunrise or sunset. You can select any action available in shortcuts including displaying an alert, setting a timer, activating a sensor, starting an app and many more. You can also trigger a chain of multiple actions together.
Step 7: After you have defined your action(s) tap on ‘Next’. You’ll see an overview of the entire automation. You can tap any section here to go back and make changes.
Step 8: Before you move forward toggle Off the ‘Ask Before Running’ option. In the confirmation pop up that appears select ‘Don’t Ask.’ If this is enabled then your automation won’t run unless you check your screen and confirm it first.
Step 9: Tap ‘Done’ to finish and you’ll see the automation you just created in your ‘Automation’ list.
To disable the automation just select the action from the ‘Automation’ list then from the next menu toggle Off the ‘Enable This Automation’ option. To enable the automation again you can go to the ‘Automation’ section in the Shortcuts app at any time and toggle-On the ‘Enable This Automation’ . If you ever want to completely delete an automation you have to just swipe left on it in the list and then tap ‘Delete.’ To use the Siri Shortcut the device needs to stay online and remote access should be enabled otherwise the device cannot be controlled via Siri.