mikejgray / neon-homeassistant-skill

A Neon AI Skill for Home Assistant, which integrates with ovos-PHAL-plugin-homeassistant.
Apache License 2.0
7 stars 4 forks source link

[BUG] "Set" Intent matching too aggressively #15

Closed NeonDaniel closed 1 year ago

NeonDaniel commented 1 year ago

Description

Similar to a previous reported bug, intents seem to match too aggressively for "set {x} to {y}".

Steps to Reproduce

Relevant Code

Probably this intent (not yet verivied) https://github.com/mikejgray/neon-homeassistant-skill/blob/main/neon_homeassistant_skill/vocab/en-us/lights.set.brightness.intent#L3

Other Notes

As part of this, skill integration tests (intent tests with other skills present) might be necessary to properly test things. Negative intent tests would also be useful to provide examples of utterances that shouldn't match a particular intent.

Maybe brightness could be a numeric entity to resolve this specific case?

Another possibility could be to get all of the valid Homeassistant devices and write those to an entity file in initialize to require an entity in the intents, though that would make fuzzy matching harder or impossible.

NeonDaniel commented 1 year ago

Negative intent tests added: https://github.com/NeonGeckoCom/.github/pull/25