Repository navigation
feat: add commute and bedtime recipes - #24
Merged
Merged
Conversation
Author
|
The Build & Release workflow is sitting in |
anubhavaanand
force-pushed
the
feat/commute-bedtime-recipes
branch
from
November 11, 2026 17:48
e4fa47d to
796d938
Compare
anubhavaanand
force-pushed
the
feat/commute-bedtime-recipes
branch
from
November 11, 2026 18:37
796d938 to
4baab36
Compare
3 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.
Summary
Adds the two recipe packs requested in #22:
recipes/commute_bluetooth_music.json— Bluetooth connected -> media volume 80% + open a music apprecipes/bedtime_winddown.json— daily at 22:30 -> brightness 25% + ringer vibrateBoth are listed in
recipes/README.mdanddocs/RECIPES.md, and neither uses shell actions. The bedtime recipe uses the default profile so it runs without switching profiles. Latch has no per-device Bluetooth filter yet, so the commute recipe fires for any Bluetooth device (noted in the recipe). The recipes include notes for the Bluetooth and Modify system settings permissions.Import fix found while validating acceptance
The acceptance criterion says both files must import cleanly. The existing importer only accepted a bare JSON array, while all recipe files (including these two and the existing ones) use the documented
{"rules":[...]}wrapper, so no recipe could import directly.Added
RuleJson.parseList()to accept either format, and tests that parse the two new recipe files through the same code path used byRuleStore.importJson(). The import dialog now says both formats are accepted. This also makes the existing recipes directly importable.Target
beta(default)main(stable hotfix only)Checklist
Verification
The recipe tests assert the values that make the recipes functional: enabled state, profile, trigger, time fields, action params, and ringer mode. I also validated every file under
recipes/as JSON with the expected{"rules":[...]}shape, knownTriggerType/ActionTypenames, and noSHELLactions.Closes #22.