Add "Assist prompt" option for CarPlay quick access#4619
Open
bgoncal wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Assist prompt” Magic Item type to CarPlay Quick Access, allowing users to create buttons that send predefined text prompts to an Assist pipeline and play back the audio response, reducing repetitive manual Assist interactions while driving.
Changes:
- Introduces
MagicItem.ItemType.assistPromptwith persisted fields (assistPrompt,assistPipelineId) and updates shared providers/migrations to support it. - Adds iOS Settings UI to create/edit Assist prompt items and wires them into CarPlay Quick Access rendering and session launching.
- Extends
CarPlayAssistSessionto optionally start by sending a text prompt (instead of recording audio), while keeping existing voice pipeline behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/Watch/WatchCommunicatorService.swift | Treats assist items as unsupported on Watch (includes new assistPrompt type). |
| Sources/Shared/Resources/Swiftgen/Strings.swift | Adds SwiftGen-accessible localized strings for Assist prompt and unsupported Assist labels. |
| Sources/Shared/MagicItem/MagicItemProvider.swift | Resolves display info for assistPrompt and normalizes CarPlay assist items (colors/confirmation). |
| Sources/Shared/MagicItem/MagicItem+Migration.swift | Excludes assistPrompt from entity-based migration logic. |
| Sources/Shared/MagicItem/MagicItem.swift | Adds new item type and persisted fields for Assist prompt. |
| Sources/CarPlay/Templates/QuickAccess/CarPlayQuickAccessViewModel.swift | Filters assist items based on iOS availability (26.4+). |
| Sources/CarPlay/Templates/QuickAccess/CarPlayQuickAccessTemplate.swift | Displays assistPrompt in Quick Access lists and launches assist sessions with optional prompt. |
| Sources/CarPlay/Templates/QuickAccess/CarPlayAssistSession.swift | Adds optional prompt flow (text Assist) and restart behavior for prompt vs recording sessions. |
| Sources/App/Settings/MagicItem/Add/AssistPromptMagicItemView.swift | New SwiftUI screen to add/edit Assist prompt items. |
| Sources/App/Settings/CarPlay/CarPlayConfigurationView.swift | Adds Assist prompt entry to the CarPlay Quick Access configuration UI and supports editing prompts. |
| Sources/App/Settings/AppIconShortcuts/AppIconShortcutItemsUpdater.swift | Updates icon mapping to include assistPrompt. |
| Sources/App/Resources/en.lproj/Localizable.strings | Adds English strings for Assist prompt UI and unsupported Assist labels. |
| HomeAssistant.xcodeproj/project.pbxproj | Registers the new Swift file and includes Xcode project bookkeeping changes. |
Comment on lines
+172
to
+175
| Image(uiImage: MaterialDesignIcons.messageProcessingOutlineIcon.image( | ||
| ofSize: .init(width: 18, height: 18), | ||
| color: .label | ||
| )) |
Comment on lines
57
to
58
| let retryButton = CPButton( | ||
| image: makeActionButtonImage(icon: .microphoneIcon, color: .haPrimary) |
Comment on lines
577
to
582
| let session = CarPlayAssistSession( | ||
| interfaceController: interfaceController, | ||
| server: server, | ||
| pipelineId: magicItem.id | ||
| pipelineId: magicItem.assistPipelineId ?? magicItem.id, | ||
| prompt: magicItem.type == .assistPrompt ? magicItem.assistPrompt : nil | ||
| ) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4619 +/- ##
=======================================
Coverage ? 43.95%
=======================================
Files ? 280
Lines ? 17013
Branches ? 0
=======================================
Hits ? 7478
Misses ? 9535
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Adds option for the user to add buttons (Assist prompts) in CarPlay Quick Access tab where when pressed sends a pre-defined prompt for the chosen Assist pipeline, gets processed and returns audio response.
Avoid recurrently asking the same to Assist in CarPlay
Example/Prompt 1: "Did I leave any of my doors open?" (The alternative would be checking each door in entity cards, the Assist prompt provides a quick single response)
Example/Prompt 2: "If my partner is home, announce in the rooms that are occupied that I am arriving home soon" (The alternative would be the user sending a message to their partner using siri or similar approach)
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes