Add skip_assistant_name option to the send service#31
Open
kauelima wants to merge 3 commits into
Open
Conversation
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
Adds an optional
skip_assistant_nameboolean to theuniversal_notifier.sendservice. When true, the assistant name is omitted from the visual prefix:[Assistant - 10:00] Greeting. Message(unchanged)skip_assistant_name: true[10:00] Greeting. Messageinclude_time: false+skip_greeting: trueMessageWhen the prefix is empty, no brackets or leading space are emitted — this also fixes the
[ - 10:00]artifact when the configured assistant name is empty. Voice/TTS andcommand_*messages are unaffected.Changes: new constant in
const.py, schema + handler + prefix logic in__init__.py, new field inservices.yaml, 3 new tests, service field tables inREADME.md/README_IT.md, and aCHANGELOG.mdentry.Motivation and Context
There is no way to send a notification without the
[Assistant Name]prefix — the name can be overridden but never removed, so mobile notifications always arrive as e.g.[Home Assistant] Good Morning. Your house is flooding. This adds the missing flag, matching the existingskip_greeting/include_timeoptions.How has this been tested?
tests/test_init.pycovering: name removed with time kept, fully bare message (all flags), and name removed from the title prefixtest-runner: 126 passed, existing prefix/greeting/title tests unchangedTypes of changes
Checklist