Repository navigation
Add Set Sleep Timer and Cancel Sleep Timer Tasker commands - #6400
Open
officialasishkumar wants to merge 2 commits into
Open
officialasishkumar wants to merge 2 commits into
officialasishkumar wants to merge 2 commits into
Conversation
The Tasker "Control Playback" action could skip, change speed, trim silence and boost volume, but had no way to start or stop the sleep timer, so automations such as "start a 15 minute sleep timer whenever a podcast starts after 10pm" were not possible. Add two new playback commands: - Set Sleep Timer: takes a "Sleep Timer (Minutes)" input and starts the timer through SleepTimer.sleepAfter, the same call the player's sleep timer sheet uses. It replaces any end of episode or end of chapter timer. Missing, non-numeric or non-positive values return a Tasker error instead of being ignored. - Cancel Sleep Timer: stops whichever sleep timer is running. SleepTimer is exposed to the plugin through TaskerEntryPoint. The Tasker plugin module had no unit tests, so add Robolectric test support and a small shim Application that serves the entry point, and cover the new commands by running ActionRunnerControlPlayback against a real SleepTimer.
officialasishkumar
requested review from
geekygecko
and removed request for
a team
November 11, 2026 14:02
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Tasker's Control Playback action can skip, change speed, trim silence and boost volume, but it can't touch the sleep timer, so automations like "start a 15 minute sleep timer whenever a podcast starts after 10pm" aren't possible.
This adds two commands to Control Playback:
SleepTimer.sleepAfter, the same call the player's sleep timer sheet makes. It replaces any end of episode or end of chapter timer that was running. A missing, non-numeric, zero or negative value returns a Tasker error rather than being ignored.SleepTimeris now available to the plugin throughTaskerEntryPoint.The Tasker plugin module had no unit tests, so I added Robolectric test support (with the same
sdk=35robolectric.propertiesthe other modules use) and a small shimApplicationthat servesTaskerEntryPoint. The new tests runActionRunnerControlPlaybackagainst a realSleepTimer.Fixes #3270
Testing Instructions
Unit tests:
./gradlew :modules:features:taskerplugin:testDebugUnitTestManual:
15.abcor0. Tasker should report the error "Sleep timer minutes … not valid".Screenshots or Screencast
N/A
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlNo Compose components or analytics were added or changed. The new input field uses the existing Tasker config screen.