A hidden device named in full is not swapped for an exposed one - #30
Merged
Merged
Conversation
With an unexposed "Desk lamp" and an exposed "Lamp", "turn on the desk lamp" came back from the model as Lamp and turned it on, 3 of 3 times on a development instance. The model can only pick from what it was shown, and Lamp was the closest option. The snapshot now keeps the names of entities the model is not shown: not exposed, a lock or entrance cover, or past the cap. They stay in Home Assistant. When the command says one of them in more words than it says the chosen device, the agent falls back and records "named a device that is not exposed".
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.
With an unexposed "Desk lamp" and an exposed "Lamp", "turn on the desk lamp" came back from the model as Lamp and turned it on, 3 of 3 times on a development instance. The model can only pick from what it was shown, and Lamp was the closest option.
The snapshot now keeps the names of entities the model is not shown: not exposed, a lock or entrance cover, or past the cap. The names stay in Home Assistant and do not go into the request. When the command says one of them in more words than it says the chosen device, the agent falls back and records "named a device that is not exposed". The same check runs before the ask-back, so a hidden "Desk lamp" is not asked about as a choice between two exposed lamps.
Tests:
test_a_hidden_device_named_in_full_is_not_swapped_for_an_exposed_one,test_a_hidden_name_is_not_asked_about_as_a_shared_one.Local gate: ruff, ruff format, mypy --strict, pytest (438 passed, 12 skipped), config_flow 100%, mkdocs --strict, hassfest. EXIT 0.
Stacked on #22: the base is
voice-ask-backand it moves tofeature/1.16when #22 merges.