When it comes to Apple, there are two types of Automations you can create:
Anatomy of an Automation
An Automation consists of three parts, Triggers, Conditions, and Actions.
When something happens
And something is true
Do one or more things
When creating an Automation, Conditions are optional and may not always be needed, and your Conditions and Actions will be part of a Shortcut run when the Triggers occur. Within your Shortcut, it's possible to run different Actions based on different Conditions, for example, take this Automation that automatically turns on my bathroom light when a movement sensor is activated — but will change which lights and how bright based on the time of day.
When bathroom motion sensor senses motion
If Current Time is between 6pm and 11pm
Turn on Main Lights at 100%
If Current Time is between 11pm and 3am
Turn on Shower Lights at 100% Red
If Current Time is between 3am and 6am
Turn on Main Lights at 20%
Turn on Vanity Lights at 20%
If Current Time is between 6am and 9am
Turn on Main Lights at 100%
Turn on Vanity Lights at 100%
This automation ensures that the lighting is appropriate for the time of day, including using our Hue color lightbulbs in the shower to cast a night-vision-protecting red light for when we need to use the bathroom during the night.
Creating Automations
To create Personal Automations, you must use the Shortcuts app. For Home Automations, you can use the Shortcuts app or the Home App.
Learn how to create your own automations: