Using Shortcuts
The Shortcuts app lets you create your own shortcuts with multiple steps that you can use with AutoSleep and many other apps and system services. You can use scripting so that the shortcut you create does different things based on your sleep data. This can includes all sorts of things, from playing selected music to setting a reminder to sending you a tailored notification. There's a good introduction to Shortcuts here.
Using HomeKit
It's worth noting that AutoSleep also support Apple HomeKit. Refer to the HomeKit page here for all the setup information.
How Do I Get Shortcuts
Shortcuts is a default app that comes pre-installed with recent iOS. However if you still do not have it, you can get it for free from the App Store by clicking here
Learn More about Shortcuts
There are some fantastic resources about shortcuts on the web. We think the best you will find is from Federico Vittici & his team at MacStories.
They have a dedicated Shortcuts page that you can read by clicking on this link.
They also provide an in depth coverage of new apps with Shortcuts support and lots of Shortcuts news.
Highly recommended!
Using AutoSleep Dictionaries in the Shortcuts app
AutoSleep updated shortcuts in Version 6.7 to output a dictionary field instead of using the clipboard.
The Shortcuts app can then read the dictionary and you can use these metrics in your shortcut scripts.
It's actually quite easy! Just follow these steps to setup.
Step 1:
Go into Shortcuts app and add a shortcut.
Step 2:
Press Add Action and enter AutoSleep into the search bar.
Step 3:
In this case we will select "Time Asleep" from the list
Press the little i button and you will see it has a result field.
Select Add to Shortcut.
You will now see Time Asleep shown.
Step 4:
You can press the little blue disclosure arrow to determine if you want to show the user interface for this or just use it in the background.
Swipe up to open the search again and type "get value" in the search bar.
Select “Get Dictionary Value”
It will display a prompt where you can enter the dictionary key that you want to use.
Step 5:
Now we need to add the key. An easy way to see available keys is to open AutoSleep, select the Time Asleep tile. If you scroll to the bottom you will see all of the keys in the dictionary for that tile. In the image below you can see all the keys available for Time Asleep:
We will use Sleep as the key.
Then you can use this value as required.
In this case, swipe up, search on notification and add Show Notification.
Run your shortcut. It will ask for permissions one time.
You will then see the following.
Available Keys
To see available keys just open AutoSleep, select the tile from the Today tab, scroll to the bottom and you will see all of the keys in the dictionary.
Time Asleep Shortcut
The Time Asleep shortcut includes the following:
"Recharge%": This is the percentage of your sleep goal that you met last night.
"Credit %": This is your sleep credit percentage according to your 7 day sleep bank.
"Debt %": Your sleep debt percentage according to your 7 day sleep bank.
"Sleep": The number of hours sleep that you had. This is in hours. So 7.75 = 7 hours and 45 minutes.
"Balance": The balance in hours of your 7 day sleep bank weighted average. This is also in hours. So 8.25 is 8 hours and 15 minutes.
"Start": The start time of your main sleep session.
"Until": The end time of your main sleep session.
Latest Bedtime Shortcut
The Latest Bedtime shortcut includes the following:
"LatestBedtime": This is the latest time you can go to bed and maintain a sleep bank credit. It is a formatted time string value. e.g. "10:30 pm". This format can be used to create reminders.
"Waketime": This is the estimated time that you most commonly wake up on the given day. This is also a formatted time string.
"TimeUntilBed": This is the number of hours until the latest bedtime. So 8.5 = 8 hours and 30 minutes.
"RequiredHours": This is the forecast number of hours sleep that you require in order to be in sleep bank credit. So 8.25 = 8 hours and 15 minutes.
Sleep Rings Shortcut
The Sleep Rings shortcut is based on the 4 AutoSleep rings and includes the following:
"Sleep%": The percentage that you have filled your sleep rings.
"Quality%": The percentage that you have filled your quality ring.
"Deep%": The percentage that you have filled your deep sleep ring.
"bpm%": The percentage that you have filled your bpm ring. 75% or higher indicates that your heart rate achieved a good quality nocturnal dip in sleeping heart rate versus your daytime non active, non sleeping average.
"Sleep": The number of hours sleep. This is in hours. So 7.75 = 7 hours and 45 minutes.
"Quality": The number of hours of quality sleep.
"Deep": The number of hours of deep sleep.
"bpm": Your average sleeping heart rate.
"SleepRating": The AutoSleep Sleep Rating that is displayed in the sleep ring section.
Readiness Shortcut
The Readiness shortcut is based on the daily readiness star rating, which considers waking HRV and waking pulse:
"Stars": The readiness star rating as a number to one decimal place.
"HRV": Your waking HRV reading in ms.
"bpm": Your waking pulse in bpm.
"BaselineHRV": Your 28 day average waking HRV in ms.
"BaselineWakingBPM": Your 28 day average waking pulse in bpm.
Shortcuts with the Apple Sleep app
You can use AutoSleep with the Apple Sleep app, we have an entire page answering all the common questions on this here, so be sure to review this first. If using both AutoSleep and Apple Sleep, shortcuts can help with making AutoSleep available on the lock screen or showing your sleep stats at wake time.
Add AutoSleep to Lock Screen
AutoSleep allows some lock screen widgets to be set. Here are the instructions for setting up Lock Screen widgets: