Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for controlling entities in an area based on a partial name #976

Open
ruifung opened this issue Feb 10, 2023 · 5 comments
Open

support for controlling entities in an area based on a partial name #976

ruifung opened this issue Feb 10, 2023 · 5 comments

Comments

@ruifung
Copy link

ruifung commented Feb 10, 2023

for example
entity name: person room ceiling lights
area: person room

sentence: turn on the ceiling lights in person room

I notice that at present, it expects a mostly exact match with the entity name or aliases, and this sentence form would be more natural in my opinion.

Not sure if this is the right place to be asking this though.

@dontinelli
Copy link
Contributor

As a workaround you could define an alias "ceiling lights". I assume this should work, as long as you indeed only call the intent with the area as well.

@ruifung
Copy link
Author

ruifung commented Feb 13, 2023

You sure about that?
I checked https://github.com/home-assistant/intents/blob/main/sentences/en/homeassistant_HassTurnOn.yaml and it doesnt seem to support areas for generic entities.

And it definitely doesnt work.
SmartSelect_20230213_082025_Telegram

@dontinelli
Copy link
Contributor

You sure about that? I checked https://github.com/home-assistant/intents/blob/main/sentences/en/homeassistant_HassTurnOn.yaml and it doesnt seem to support areas for generic entities.

And it definitely doesnt work. SmartSelect_20230213_082025_Telegram

It should work, if you define an alias "alcove lights" (or in the first example "ceiling lights") for person room ceiling lights. So no support for generic entities but you can rename entities to match your needs.

@ruifung
Copy link
Author

ruifung commented Feb 14, 2023

so the home assistant matching logic can match "area" "entity" as an entity name?
Well, it's good to know I guess.

But IMO, in should probably be suported too, if only for consistency with the other actions. And feels more natural in an english sentence to me. But that's probably out of scope of this particular issue I suppose.

And I still think having some kind of partial/fuzzy matching for entities would probably be beneficial for the user experience. Assuming it doesn't perform an action on a low-confidence match I suppose.

@synesthesiam
Copy link
Contributor

Partial/fuzzy matching will come later when we use the sentences from this repo to train actual machine learning models. For example: generating all possible sentences and using snips-nlu to train an English model.

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

No branches or pull requests

3 participants