| Line 1: |
Line 1: |
| − | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | + | <pre class="header-style">This trigger will fire at sunrise or sunset for the chosen location. The exact sunrise and sunset times are calculated based on your configured location and automatically adjust throughout the year.</pre> |
| − | This trigger will fire at sunrise or sunset for the chosen location. | + | |
| − | </pre> | + | ''' Options ''' |
| − | ''Supports these activation modes:'' | + | |
| − | * Trigger at exact time. | + | * '''Sunrise/Sunset''': Choose whether to trigger at sunrise or sunset |
| − | * Trigger in advance. | + | * '''Time Adjustment''': Configure when the trigger fires relative to the actual sunrise/sunset time: |
| − | * Trigger after delay. | + | ** '''Trigger at exact time''': Fire exactly at sunrise/sunset |
| | + | ** '''Trigger in advance''': Fire before sunrise/sunset by a specified amount (up to 23 hours and 59 minutes) |
| | + | ** '''Trigger after delay''': Fire after sunrise/sunset by a specified amount (up to 23 hours and 59 minutes) |
| | + | * '''Use Alarm Clock Mode''': When enabled, ensures the trigger fires reliably even in Doze mode (recommended for time-critical actions) |
| | + | * '''Location''': Set the location used to calculate sunrise/sunset times (configured via MacroDroid settings) |
| | + | |
| | + | ''' Configuration ''' |
| | + | |
| | + | On first use, you will be prompted to set a location for sunrise/sunset calculations. This location is shared across all Sunset/Sunrise triggers and can be changed later in MacroDroid settings. |
| | + | |
| | + | The trigger automatically reschedules itself when: |
| | + | * The device's time zone changes |
| | + | * The system time is manually adjusted |
| | + | * The previous scheduled trigger fires |
| | + | |
| | + | ''' Examples ''' |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Sunset/Sunrise: Sunrise (-30m)</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Set Volume - Media: 3 |
| | + | Speak Text: Good morning, the sun will rise in 30 minutes</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Day of Week: Monday, Tuesday, Wednesday, Thursday, Friday</pre> |
| | + | |
| | + | ''Wake up routine that triggers 30 minutes before sunrise on weekdays.'' |
| | + | |
| | + | ---- |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Sunset/Sunrise: Sunset</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Send Intent: Turn on outdoor lights (to third party app) |
| | + | Set Brightness: 50%</pre> |
| | + | |
| | + | ''Automatically turn on outdoor lights at sunset.'' |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * The location for sunrise/sunset calculations must be set before using this trigger. The location can be changed later in MacroDroid settings. |
| | + | * Times are calculated using the official sunrise/sunset times (when the sun's upper edge touches the horizon). |
| | + | * The trigger responds to timezone changes and will automatically reschedule. |
| | + | * This trigger requires the Schedule Exact Alarms permission on Android 12 and above. |
| | + | * The time adjustment can be useful for triggering actions during twilight periods (e.g., 30 minutes before sunset for "golden hour" photography alerts). |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Action:_Brightness|Brightness Action]] |
| | + | * [[Constraint:_Day_of_the_Week|Day of Week Constraint]] |
| | + | * [[Trigger:_Day/Time_Trigger|Day/Time Trigger]] |