Automation Creation for Auto-Lock, Lock Screen (IF & Then) Scenario Help

I am trying to build an Automation that says:


If connected to power then set Auto-Lock Screen> Never, Notify Initiation.

but

If Not connected to power, then set Auto-Lock Screen> 3 Minutes, Notify Initiation.


I am willing to have it in 2 different Automations if I can get them to work together.


I do a lot of work between my phone and my laptop and if I turn my head to my laptop for however long, it's annoying to have to reopen my phone constantly. Yes, I can manually set it to Never but then I have to manually reset it when I'm not working, and I just want to simplify the whole thing. My phone is only ever on constant charge when I'm at home, so I also don't need it all the time. I'd like to be able to sit down, put my phone on the charger, open the screen and not have to deal with it again unless I take it off the power and then it's fine to lock after 3 minutes unless I lock it personally before then. I'd also like it to notify me so I'm not guessing if the Automation is working or not.


I've tried several different times and even asked Bing AI to help but I am defeated. The issue with Bing AI's help is that they tell me to search, find, and add Auto-Lock from the actions list but Auto-Lock is not there for me, only Lock Screen is.


I've made 2 Automations before, 1 to speak when battery was low and 1 to speak when battery was full, but this has me pulling my hair out.


If anyone could help me, I'd be ever so over the moon. The images are for reference.


******************

******************

******************

******************

******************

******************


iPhone 15 Pro Max

Posted on Oct 10, 2023 4:34 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 10, 2023 5:44 PM

Sorry, this won't be possible. Most of the settings in Settings are not modifiable from Shortcuts. You can turn Wi-Fi on and off, for instance, but Auto-Lock is not available from Shortcuts.


The Lock action you showed in your screenshot is just to lock the screen, not to change the Auto-Lock feature.


The best you can achieve is for the shortcut to bring you directly to the Auto-Lock setting in Settings but you'll have to manually set the desired time yourself. To do this, use the "Open URLs" action and set it as below:


Similar questions

2 replies
Question marked as Top-ranking reply

Oct 10, 2023 5:44 PM in response to MistresxofxPain

Sorry, this won't be possible. Most of the settings in Settings are not modifiable from Shortcuts. You can turn Wi-Fi on and off, for instance, but Auto-Lock is not available from Shortcuts.


The Lock action you showed in your screenshot is just to lock the screen, not to change the Auto-Lock feature.


The best you can achieve is for the shortcut to bring you directly to the Auto-Lock setting in Settings but you'll have to manually set the desired time yourself. To do this, use the "Open URLs" action and set it as below:


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.

Automation Creation for Auto-Lock, Lock Screen (IF & Then) Scenario Help

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