I was looking around on my iPhone’s Shortcuts app to see if it would do anything fun. The app has three sections, shortcuts, automation and gallery. I’ve been exploring the automation section. My iPhone’s automation controls let me select an event to trigger a sequence of actions when the event happens.
Last year, I created an event to keep low power mode even if the battery is fully charged. The trigger that I identified is “When Low power Mode is turned off.” I made that trigger cause a “Set Low Power Mode” action to toggle it back on.
When the phone charges to 80%, it normally turns low power mode off. That would activate the trigger for my automation. The automation rule would then execute the action and turn low power mode back on. I could see this on the display: the battery would change color indicating full power and then quickly change back to the low power color. (The trigger and action don’t fight with each other; it doesn’t cause flipflopping between the low power/normal power states.)
After a few days, I disabled the rule because I didn’t like some of the effects of low power. For example, not downloading in the background. It was a fun idea, but not very useful for me. However, it was an introduction to the possibilities.
This week, I created a new event using a trigger in the “Time of Day” section. One option is a trigger on Sunrise or Sunset. I selected the option to “run immediately” at the moment of sunset. I could also select a time interval relative to sunset such as 15 minutes before or 2 hours after.
In setting up actions, I picked the “Speak Text” option, setting it to say “The sun has just set.” (How clever!) I decided to have a second action for the music app play a song. I would have picked “The Sunset” from the Moody Blues album “Days of Future Passed” but I don’t have that on my phone. I found “Sunshine” by Matisyahu which was just as good as anything else.
The triggered time doesn’t match what the astronomy data site https://heavens-above.com gives for the time of sunset at my location. It is 5 minutes early. It might be because heavens-above defines sunset as the sun being 0.8° below the horizon to account for the refraction of sunlight in the atmosphere. If the iPhone is using 0°, it could explain the discrepancy. I couldn’t find online the definition of sunset used by the iPhone.
For Ramadan or the Baha’i 19 day fast, it would be nice to have clarity on how sunset is defined. Similar events could help plan daily prayers planned around the sun’s position.
It’s fun to hear the time of sunset announced.
