Tasker walkthroughs#
Explore common use cases and step-by-step guides for automating Sleep as Android using Tasker.
Create an “Add Alarm” Widget#
While Sleep as Android offers many widgets, you can create a custom one-tap “Add Alarm” button using Tasker:
- Open Tasker and navigate to the Tasks tab.
- Tap (+) and name your task “Add Alarm”.
- Add an action:
System➔Send Intent.- Action:
com.urbandroid.sleep.alarmclock.SetAlarm - Package:
com.urbandroid.sleep - Target:
Activity
- Action:
- Assign an icon to the task (bottom-right corner).
- On your phone’s home screen, add a Tasker Task Shortcut and select your new “Add Alarm” task.
Automate Light Shows with hueManic#
Use Sleep as Android events to trigger party or relaxation modes in our hueManic app.
The Setup Walkthrough#
- Tasker Task: Add action
System➔Send Intent.- Package:
com.urbandroid.hue - Class:
com.urbandroid.hue.ProgramService - Extras:
EXTRA_START:startEXTRA_PROGRAM:DISCO(Options:FIREPLACE,STORM,SEA,JUNGLE,AURORA)
- Target:
Service
- Package:
- Tasker Profile: Add
Event➔Plugin➔Sleep.- Configuration: Select
Alarm started.
- Configuration: Select
- Link the Profile to your new hueManic Task.
Mi Band: LED/Vibration Alerts for Alarms#
If you use Mi Band Tools, you can bridge Sleep as Android alarms to your band:
- Tasker Profile:
Event➔Plugin➔Sleep➔Alarm Started. - Task: Add action
Alert➔Notify. Set the title to “SleepAlarm”. - Mi Band Tools: Create a new alert for the Tasker app and filter it to only trigger for the title “SleepAlarm”.
Auto-Start Sleep Tracking Every Night#
You can schedule Sleep as Android to begin tracking at a specific time automatically:
- Tasker Profile:
Time➔ Set From and To to your target bedtime (e.g., 10:00 PM). - Task: Add action
Plugin➔Sleep➔ Tap the Pencil icon ➔ SelectStart sleep tracking. - Ensure Tasker is enabled.