-
Notifications
You must be signed in to change notification settings - Fork 565
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
[en] Refactor HassLightSet using LLM TDD and new expansions #2783
base: main
Are you sure you want to change the base?
Conversation
This doesn't always make sense in a sentence to allow `the` to prefix. It's not that big of a deal, however once adding `<the>` in, it does increase the number of matching sentences by even more. This patch can be considered an optimization rather than a quality improvement.
This should make the matching more robust and much easier to manage.
numeric_value_set: "(set|change|turn [(up|down)]|increase|decrease|make)" | ||
set: "(set|make|change|turn|adjust)" | ||
numeric_value_set: "(set|change|turn [(up|down)]|increase|decrease|make|adjust)" | ||
brightness_value_set: "(<numeric_value_set>|(brighten [up]|lighten [up]|brighten [up]|dim [down]|darken [down]))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brightness_value_set: "(<numeric_value_set>|(brighten [up]|lighten [up]|brighten [up]|dim [down]|darken [down]))" | |
brightness_value_set: "(<numeric_value_set>|(brighten [up]|lighten [up]|dim [down]|darken [down]))" |
@@ -379,15 +381,16 @@ expansion_rules: | |||
any: "(any|some) [of <the>]" | |||
are_any: "[<are>] <any>" | |||
how_many: "how many [of <the>]" | |||
brightness: "{brightness}[([ ]%)| percent]" | |||
light: "[<the>] (light|lights|lighting|lamp|lamps)" | |||
brightness: "({brightness}[([ ]%)| percent]|[the] {brightness_level:brightness} [(level|value|setting)]) [(brightness|bright|light)]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are a few examples of what I don't like that's possible:
- the all the way up level light
- as bright as possible level bright
- the as light as possible light
- max setting light
- full value
I think that these combinations [(level|value|setting)]) [(brightness|bright|light)]
should be in <brightness_level>
for each word where they make sense. Same for the preceding [the]
.
- "[<numeric_value_set>] <name> brightness [to] <brightness>" | ||
- "[<numeric_value_set>] [the] brightness [of] <name> [to] <brightness>" | ||
- "[<numeric_value_set>] <name> [to] <brightness> [brightness]" | ||
- "[<brightness_value_set>] [<area_floor>] <name> [brightness] [to] <brightness>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Brighten up the living room chandelier brightness..." sounds a bit off...
I think that [brightness]
should only be used with <numeric_value_set>
. In which case either make it mandatory or remove <numeric_value_set>
from <brightness_value_set>
to avoid duplications.
- "[<numeric_value_set>] <area> [to] <brightness>" | ||
- "[<numeric_value_set>] [all] [the] lights [<in>] <area> to <brightness> [brightness]" | ||
response: "brightness" | ||
- "[<brightness_value_set>] [(<all>|<the>)] <area_floor> [<light>] [brightness] [to] <brightness>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will match "living room all the way up". Does that mean brightness? Does that mean temperature? Does that mean volume?
In this case, brightness
should not be optional, I think.
@@ -18,18 +18,12 @@ intents: | |||
- "<area> <light> (off|out)" | |||
- "<light> (off|out) [in] <area>" | |||
- "<turn> (off|out) [<all>] <area> <light>" | |||
- "<turn> (off|out) [<all>] <light> <in> <area>" | |||
- "<turn> (off|out) [(<all>|<the>)] <light> in <area>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? And why only here?
- "<turn> (off|out) [(<all>|<the>)] <light> in <area>" | |
- "<turn> (off|out) [(<all>|<the>)] <light> <in> <area>" |
E.g. "Turn off all of the lights on the patio".
This should make the matching more robust and much easier to manage.
This depends on #2728 getting merged first.