Repository navigation
"Announce as" name per profile; say vehicle names naturally (v0.5.3) - #4
Merged
Merged
Conversation
- Optional "Announce as" on Add/Edit a bus profile: alerts, their
message, and "where is the bus?" use it, e.g. "Daniel's bus".
- Without it the vehicle name is used, and "Bus" is only added before a
route number ("12" -> "Bus 12"), so "Oleg's bus" is no longer
"Bus Oleg's bus".
- Profile names must be unique across all Bus Monitor entries, since
services and the map find a profile by id across entries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What
"Announce as" (optional) on Add / Edit a bus profile. When set, every spoken text for that profile uses it:
message, plus the event'sbus)describe_location("where is the bus?")So "Daniel – morning" and "Daniel – afternoon" can both announce "Daniel's bus".
Vehicle names sound natural. Without Announce as, the vehicle's name is used, but "Bus" is now only added before a route number:
12→ "Bus 12" and18 Orange→ "Bus 18 Orange", as before.Oleg's bus,Carpool vanandBus 7are said as is.Before, every name not starting with "bus" got the prefix, giving "Bus Oleg's bus is about 5 minutes away."
Profile names are unique across all Bus Monitor entries, not just within one. The services (
describe_location,reset_trip,suggest_checkpoints) and the map look a profile up by id across entries. Two "Morning" profiles in a Traccar and a Bouncie entry would have been ambiguous: the first one found would win.Implementation
announce_asis stored in the profile and loaded into the existingBusConfig.bus_name. The coordinator only fillsbus_namefrom the vehicle when it's empty. Every speaker already readsbus_name, so the override needed no other changes.Reviewer notes
Orange), is no longer said as "Bus Orange". Announce as restores any wording someone wants.Tests
ruff,pytest(103 tests) and hassfest (run locally in Docker) all pass. New and updated tests:bus_labelcases (route numbers, "Oleg's bus", "Carpool van", "12 bus")bus/messageand indescribe_location🤖 Generated with Claude Code