Add volume assistant sensor - #7078
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new assistant volume sensor to the Companion App’s audio sensor set, and wires it into the existing volume-change broadcast handling so the sensor can update when volume changes occur.
Changes:
- Add a new
volume_assistantBasicSensortoAudioSensorManager, including its strings and icon - Update
SensorReceivermappings (mobile + wear) so volume-change intents can trigger assistant volume updates - Extend audio mode state mapping to include
MODE_ASSISTANT_CONVERSATION
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| wear/src/main/kotlin/io/homeassistant/companion/android/sensors/SensorReceiver.kt | Adds volAssistant to the wear volume-change sensor mapping |
| common/src/main/res/values/strings.xml | Adds name/description strings for the new assistant volume sensor |
| common/src/main/kotlin/io/homeassistant/companion/android/common/sensors/AudioSensorManager.kt | Introduces volAssistant, adds availability/update gating, and extends audio mode mapping |
| app/src/main/kotlin/io/homeassistant/companion/android/sensors/SensorReceiver.kt | Adds volAssistant to the mobile volume-change sensor mapping |
b806e8b to
e9873e0
Compare
52b95fc to
0c7ae12
Compare
5c5a9de to
6815184
Compare
0c7ae12 to
f2f54a5
Compare
6815184 to
f3dd9fd
Compare
f2f54a5 to
bce7346
Compare
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 5d05a44. ♻️ This comment has been updated with latest results. |
jpelgrom
left a comment
There was a problem hiding this comment.
One very minor suggestion and one comment on the state of icons, but the actual change is good!
| "sensor", | ||
| commonR.string.sensor_name_volume_assistant, | ||
| commonR.string.sensor_description_volume_assistant, | ||
| "mdi:assistant", |
There was a problem hiding this comment.
This is quite different from what Android uses - the correct icon appears to be Voice Chat, but MDI hasn't updated in a long time and appears to be basically dead :-/
There was a problem hiding this comment.
by MDI hasn't updated you mean a lib we use or something else?
There was a problem hiding this comment.
The lib we, but more importantly, core uses for icons https://pictogrammers.com/library/mdi/
f3dd9fd to
bbdf55b
Compare
bce7346 to
5d05a44
Compare
bbdf55b to
15ba358
Compare
21ab925 to
7dccab6
Compare
7032c01 to
3088dc4
Compare
a2055cf to
75ed143
Compare
75ed143 to
3437d5c
Compare
Pull request was closed
Summary
Add the volume assistant sensor when available (Android 17+)
Checklist
Link to pull request in documentation repositories
User Documentation: home-assistant/companion.home-assistant#1356