If you want to automatically turn on your outdoor lights when you arrive home after sunset and avoid interference with CarPlay or other distractions, follow these steps:
1. Create an Automation in the Shortcuts App
- Open the Shortcuts app on your iPhone.
- Tap the “Automation” tab at the bottom of the screen.
- Tap the “+” button to create a new automation.
- Choose “Arrive” as your trigger action.
- Select your home address or set a location for “Arrive.”
- This step ensures that the automation runs when you arrive at your home.
- Tap Next.
2. Add a Condition for Sunset
- Tap “Add Action”.
- Search for “If” in the search bar.
- Select the “If” action from the list.
- Set up the condition:
- Under the “If” action, tap the “Condition” to check for sunset. Select “Date” and set the condition to check if the time is after sunset.
- You can use “Sunset” as a condition from your iPhone’s Weather app if you have it connected to the Shortcuts app.
- After the sunset condition, tap “Otherwise” to set the alternative action (you can leave it blank if you don’t want anything to happen before sunset).
3. Add the Action to Turn on the Lights
- Search for “Control Home” in the search bar.
- Select the “Control Home” action to manage your HomeKit-compatible devices.
- Choose your outdoor lights from the list of devices.
- Set it to Turn On.
4. Turn Off the “While Driving” Condition on CarPlay
The “Not While Driving” issue arises because CarPlay blocks automation during driving. To bypass this, make sure to disable “While Driving” automation restrictions:
- Go to “Settings” > “Shortcuts”.
- Scroll down to “Allow Untrusted Shortcuts” and enable it.
- When prompted, disable “When Driving” restrictions in the automation settings.
5. Save Your Automation
- After setting the above actions, tap Next.
- Review your automation to ensure everything is set correctly.
- Tap Done to save your automation.
Troubleshooting Tips:
- Location Accuracy: If the location trigger isn’t working correctly, try adjusting your home address in the “Arrive” action. You can use the “Get Current Location” shortcut if needed.
- Sunset Time Sync: Ensure your sunset time is synced to your location. If it’s not working, you can manually set the time to turn on the lights or use third-party apps that support sunset times and integrate them with Shortcuts.
- Test the Automation: After setting up, test the automation manually to make sure it turns on the lights at the right time when you arrive home after sunset.





