Repository navigation
mobile_push: Android commands and TTS sent as calls of their own - #277
Merged
Merged
Conversation
The companion app takes notification commands and TTS as the message of a call (message: command_dnd + data.command, message: TTS + tts_text), not as notification data, so mobile_push_command_* went nowhere and mobile_push_tts_text only showed text. Commands now go just before the notification and TTS just after it (on the alarm stream for critical), to Android phones only. Tried on a Samsung S26 Ultra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQHWk2kktg8aTN36n3PKVr
Tried on a Galaxy Watch: TTS on alarm_stream was too quiet to hear, alarm_stream_max was heard. The companion app puts the volume back afterwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQHWk2kktg8aTN36n3PKVr
Without it the TTS call waited until the phone was unlocked and was then spoken late, alongside the next one. Tried on a Samsung S26 Ultra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQHWk2kktg8aTN36n3PKVr
Started together, the TTS cut off the notification's own sound. One wait for all the devices, mobile_push_tts_delay to change it (0 for straight away). Tried on a Samsung S26 Ultra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQHWk2kktg8aTN36n3PKVr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XHmtQPskJJiphmnb37zkdR
…s-tts # Conflicts: # custom_components/supernotify/transports/mobile_push.py # tests/components/supernotify/transports/test_transport_mobile_push.py
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.
Follows #274 / #275 - the
mobile_push_command_*/mobile_push_tts_textpart.The companion app takes notification commands and TTS as the
messageof a call of their own (message: command_dnd+data.command,message: TTS+data.tts_text), not as data of an ordinary notification. So todaymobile_push_command_dnd/_ringer_mode/_screen_ongo nowhere, andmobile_push_tts_textis never spoken.Now, to Android devices only (an iPhone, or a device whose manufacturer isn't known, would show
command_dndas a notification):mobile_push_command_*is sent as its own call just before the notification, so the screen is on / Do Not Disturb is off when it arrivesmobile_push_tts_textis sent as its ownmessage: TTScall after the notification - one wait for all the devices, 5 seconds by default, since started together the TTS cut off the notification's own sound; newmobile_push_tts_delaychanges it (0for straight away).mobile_push_tts_locale/_enginego with it astts_text_language/tts_enginecritical, the extra calls carryttl: 0+priority: highlike the notification (without them the TTS waited for the phone to be unlocked and was then spoken late), and the TTS goes onmedia_stream: alarm_stream_max(the app puts the volume back afterwards); otherwisemobile_push_alarm_stream/_maxpick the streamsingle_target=True, as the notification call does since Follow re-paired mobile apps, and raise a repair rather than snooze a missing notify action #272, so a missing device isn't a transport failurecommand_dndtakesalarms_only/priority_only/total_silence/off,command_screen_onalsokeep_screen_ontransports/mobile_push.mdOne thing you may want different: the TTS wait is an
asyncio.sleepinsidedeliver(), so a delivery withmobile_push_tts_texttakes those 5 seconds longer to finish. Happy to move it to a background task if you'd rather.Tried on my own HA with a Samsung S26 Ultra: commands, TTS after the notification, and a critical TTS heard on Do Not Disturb.
Locally on Python 3.14: ruff, ruff format, codespell, mypy clean; HA 2026.10.0 lane 2394 passed (coverage 97%,
mobile_push.py99% - the two missed lines are pre-existing), HA 2026.4.4 lane 2357 passed, 1 skipped. Branch merged with currentmain.🤖 Generated with Claude Code
https://claude.ai/code/session_01XHmtQPskJJiphmnb37zkdR