feat: inject device area context for room-aware voice responses#12
Open
DarrenBenson wants to merge 16 commits into
Open
feat: inject device area context for room-aware voice responses#12DarrenBenson wants to merge 16 commits into
DarrenBenson wants to merge 16 commits into
Conversation
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
[Voice command from: <room>]into the system prompt sent to OpenClawx-openclaw-areaandx-openclaw-device-idheaders for structured accessMotivation
When a user speaks to a voice satellite (e.g. Voice PE in the Study), OpenClaw has no way to know which room they're in. This means "turn off the lights" or "what's the temperature in here?" can't be resolved to the correct room.
HA's
ConversationInputalready carriesdevice_id(since HA 2024.4), and the device registry knows which area each device belongs to. This PR connects those dots.How it works
device_idfromConversationInput(already provided by the Assist pipeline)hass.helpers.device_registryto get itsarea_idhass.helpers.area_registryto get the area name[Voice command from: Study]to the system promptx-openclaw-areaandx-openclaw-device-idheadersBackwards compatible
device_idis not available (e.g. non-satellite input), no context is addedx-openclaw-device-idis sentTest plan
🤖 Generated with Claude Code