Repository navigation
feat: add car Bluetooth recipe - #7
Merged
Merged
Conversation
recipes/car_bluetooth.json sets the ringer to vibrate (RINGER_MODE, ringerMode VIBRATE) and posts a notification when a Bluetooth device connects (BLUETOOTH_CONNECTED). The trigger has no per-device filter, so it fires for earbuds and watches too; the rule notes and the recipes README say so and ask the user to refine it before relying on it. Closes wized2#2
wized2
approved these changes
Oct 25, 2026
wized2
left a comment
Owner
There was a problem hiding this comment.
Looks good — targets beta, valid BLUETOOTH_CONNECTED / RINGER_MODE / VIBRATE / NOTIFY, and the notes correctly explain the any-device limitation.
Owner
|
Merged — thanks @am-official! Good catch on the existing recipe enum mismatches ( |
3 of 5 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.
Closes #2
Summary
Adds
recipes/car_bluetooth.json. When a Bluetooth device connects (BLUETOOTH_CONNECTED), it sets the ringer to vibrate (RINGER_MODEwithringerMode: VIBRATE) and posts a notification. It also adds an entry torecipes/README.md.Device filter:
RuleEngine.onBluetoothfiresBLUETOOTH_CONNECTEDfor every device and does not readtriggerParam, so there is no per-device filter to preset. As the issue asks, the rule'snotesand the README entry say the rule fires for any device (earbuds and watches too) and that the user has to refine it, for example with a condition or a car profile.Schema check: the file uses the same fields as the existing recipes. I checked every trigger, action, condition and ringer name against the enums that
Rule.fromJson/RuleAction.fromJsonpass tovalueOf, and all names in the new file are valid.While checking, I noticed three existing recipes use names that aren't in those enums.
valueOfthrows on them, so I expect importing them to fail:charging_notify.json: triggerPOWER_CONNECTED(the enum hasCHARGER_CONNECTED)night_dnd.jsonandwork_wifi_silent.json: actionSET_RINGER(the enum hasRINGER_MODE)I left them out of this PR to keep it to the issue. I'm happy to send a separate fix if you'd like one.
Target
beta(default)main(stable hotfix only)Checklist