Skip to content

Bus profiles as config subentries (v0.7.0) - #6

Merged
aniceberg merged 1 commit into
mainfrom
profile-subentries
Nov 1, 2026
Merged

aniceberg merged 1 commit into
mainfrom
profile-subentries

Conversation

@aniceberg

Copy link
Copy Markdown
Owner

Summary

Each bus profile is now its own item under its Traccar server or Bouncie account, as a Home Assistant config subentry. Profiles no longer live inside the account's options.

  • Add bus profile appears on the integration page. Each profile has its own ⋮ menu: Reconfigure (edit the profile, add an alert checkpoint, remove checkpoints) and Delete.
  • The account's Configure keeps only the polling-rate and sidebar settings.
  • Migration 2.2 → 2.3 turns each profile in the options into a subentry. Profile ids don't change, so entity unique_ids and IDs, recorded trips, today's trip state, profile: in scripts and the map panel all carry over.
  • Each profile gets its own device, linked to its bus (HA 2026.10 doesn't allow several subentries to share a device). The bus device keeps its device_tracker. Deleting a profile removes only that profile's entities.
  • Shorter entity IDs for new profiles (sensor.morning_status). Existing entities keep their IDs.
  • The map panel's checkpoint editor (bus_monitor/set_checkpoints) now writes to the profile's subentry.

Test plan

  • pytest (125 passed). New tests cover: the migration keeps entity IDs and links them to the subentry; adding a profile through the subentry flow; deleting one profile removes only its entities; Configure holds only the settings.
  • ruff check
  • hassfest (Docker)
  • On the real HA after updating: both of Daniel's profiles appear under the Bouncie entry, entity IDs are unchanged, and Reconfigure → Edit the profile saves.

🤖 Generated with Claude Code

- Each bus profile is a config subentry of its Traccar server or Bouncie
  account: "Add bus profile" on the integration page, and per profile
  Reconfigure (edit the profile, add or remove checkpoints) and Delete.
  The account's Configure now only holds the polling and sidebar settings.
- Migration 2.2 -> 2.3 moves the profiles out of the options. Profile ids,
  and so entity unique_ids/IDs, recorded trips, scripts and the map panel,
  are unchanged.
- Each profile gets its own device, linked to its bus (HA 2026.10 doesn't let
  subentries share a device); the bus device keeps its device_tracker.
  Deleting a profile removes only its entities.
- New profiles get shorter entity IDs (sensor.morning_status); existing
  entities keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T02:01:22.456625Z 8ee6ecc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@aniceberg
aniceberg merged commit 692ac17 into main Nov 1, 2026
6 checks passed
@aniceberg
aniceberg deleted the profile-subentries branch November 1, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant