iOS Shortcuts: Set Focus - "Until Time" ignored

I'm trying to create a shortcut that takes a duration in minutes as input (number) and use that input to:

  1. Create a timer that will go off after that duration passes (by creating a "start a timer" step with provided input)
  2. Puts the phone in sleep mode until that duration passes (by adding provided input to current date and using the adjusted date as input when turning sleep on)


Problem:

Focus mode "sleep" is set indefinitely despite an end time being specified.


To reproduce this issue in an easy way, I created a shortcut on my phone with just one step:

Turn "Sleep" "On" until "Time" "9 AM"


When you run this shortcut on iOS, the focus mode is set indefinitely. When you run the same shortcut on MacOS (sync'd across iCloud), the end time works.


Other things I tried:

  • I thought maybe the Health app's sleep schedule was intervening, so I tried turning that off. It still didn't work.
  • I tried modifying the format of "current time" and "adjusted time" in my shortcut by setting date format to "none" and time format to "short". That didn't work either. The reproduction steps I listed above and testing the same exact shortcut on MacOS suggest that the problem is not with the date/time input format; that the issue is specific to iOS.


Any help or escalation to Apple would be greatly appreciated as I have a ton of ideas for things I'd like to automate with Shortcuts 🤓


Thanks

iPhone 14 Pro, iOS 17

Posted on Apr 13, 2024 8:30 AM

Reply

Similar questions

5 replies

Apr 13, 2024 10:29 AM in response to H__I__

Did you try to use another Focus mode? I just did a test on an iPad using iPadOS 17.4.1 (it shouldn’t be much different from an iPhone) and the following action works:



After running it, “Do Not Disturb” turned off automatically at 12:24 PM. Note that I’m using “24-Hour Time” on the iPad. I don’t know if it’s important.

Apr 13, 2024 12:56 PM in response to H__I__

I'm confused too as to why it doesn't on the iPhone, yet it works on the Mac.


I don't use the Sleep Focus at all; in fact I deleted it. As an experiment, I added it again and tested the shortcut. Same result as yours: the sleep focus is not turned off automatically.


Please notify Apple of this drawback as @Alancito suggested.

Apr 13, 2024 12:41 PM in response to 6x6

Interesting... I just tried "Do Not Disturb", and that worked! I'll use that for now. Thanks for the suggestion.


Still wondering why a specified time does not work for "Sleep" focus 🤔 Ideally, I should be able to reuse a focus mode that I already configured with all the options for contact and app exclusions, right? 👀

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iOS Shortcuts: Set Focus - "Until Time" ignored

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.