feat: add play_melody service for buzzer melodies - #76
Merged
g4bri3lDev merged 1 commit intoJul 27, 2026
Conversation
Add a new opendisplay.play_melody sibling service that plays a multi-note melody on a device's buzzer via BuzzerActivateConfig.melody(). activate_buzzer stays a single-tone service; its docs gain a pointer to the new service. - services.py: _valid_melody validator, SCHEMA_PLAY_MELODY, _async_play_melody handler (mirrors _async_activate_buzzer), and registration. - services.yaml / strings.json / translations/en.json: play_melody definition, field docs (grammar summary), and the invalid_melody exception, in lockstep. - tests/test_services.py: wire-byte, plumbing, guard, and schema tests. manifest.json pin bump deferred until the py-opendisplay release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
davelee98
force-pushed
the
feat/play-melody
branch
from
July 25, 2026 18:51
d30f77a to
79faf08
Compare
g4bri3lDev
approved these changes
Jul 27, 2026
This was referenced Jul 27, 2026
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.
Add a new
opendisplay.play_melodysibling service that plays a multi-note melody on a device's buzzer viaBuzzerActivateConfig.melody().activate_buzzerstays a single-tone service; its docs gain a pointer to the new service.services.py:_valid_melodyvalidator,SCHEMA_PLAY_MELODY,_async_play_melodyhandler (mirrors_async_activate_buzzer), and registration.services.yaml/strings.json/translations/en.json:play_melodydefinition, field docs (grammar summary), and theinvalid_melodyexception, in lockstep.tests/test_services.py: wire-byte, plumbing, guard, and schema tests.No dependency bump needed:
BuzzerActivateConfig.melody()already ships in the pinnedpy-opendisplay==7.14.0(added in v7.13.0), somanifest.jsonis unchanged.Rebased onto current
feat/clean-portThis branch has been rebased onto the latest
feat/clean-port(through #74). The base had since added thewrite_nfcservice, which inserted its schema/handler/registration and translation blocks at the same spots asplay_melody. Resolved by keeping both services side by side —write_nfcandplay_melodynow coexist acrossservices.py,services.yaml,strings.json, andtranslations/en.json. The branch merges cleanly intofeat/clean-portwith no conflicts; the diff is purely additive (play_melodyonly).