-
Notifications
You must be signed in to change notification settings - Fork 602
[en] Refactor HassLightSet using LLM TDD and new expansions #2783
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
base: main
Are you sure you want to change the base?
Conversation
c0eb507
to
513d11a
Compare
This should make the matching more robust and much easier to manage.
513d11a
to
d2b3f10
Compare
out: 100 | ||
- in: (min|minimum|lowest) | ||
- in: "[the] (half|halfway|mid) [(level|setting|brightness|bright|light|lit)]" |
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.
"The mid lit" doesn't sound right
- in: "[the] (half|halfway|mid) [(level|setting|brightness|bright|light|lit)]" | |
- in: "([the] (half|halfway|mid) [(level|setting|brightness|light)]|(half|halfway|mid) (bright|lit)" |
- "[<numeric_value_set>] [[(<all>|<the>)] <light>] [brightness] [to] <brightness> <in_area_floor>" | ||
- "[<numeric_value_set>] [(<all>|<the>)] <light> <in_area_floor> [brightness] [to] <brightness>" | ||
|
||
- "[<numeric_value_set>] [the] brightness [of [(<all>|<the>)]] <in_area_floor> [<light>] [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.
- "[<numeric_value_set>] [the] brightness [of [(<all>|<the>)]] <in_area_floor> [<light>] [to] <brightness>" | |
- "[<numeric_value_set>] [the] brightness [of [(<all>|<the>)]] <area_floor> [<light>] [to] <brightness>" |
- "[<numeric_value_set>] [the] brightness of <area> to [the] {brightness_level:brightness}" | ||
- "[<numeric_value_set>] <area> brightness to [the] {brightness_level:brightness}" | ||
- "[<numeric_value_set>] <area> [to] [the] {brightness_level:brightness} brightness" | ||
- "[<numeric_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 would match "living room 50%" which, again, may not necessarily mean brightness. It could mean fan speed, it could mean many more things. It's too ambiguous
- "[<brightness_relative>] [(<all>|<the>)] <area_floor> [<light>] [to] <brightness>" | ||
- "[<brightness_relative>] [[(<all>|<the>)] <light>] [to] <brightness> <in_area_floor>" | ||
- "[<brightness_relative>] [(<all>|<the>)] <light> <in_area_floor> [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.
With optional <brightness_relative>
, these are the same sentences as above (with <numeric_value_set>
. Remove the optional part.
- "[<numeric_value_set>] [(<all>|<the>)] <light> [brightness] [<here>] [to] <brightness>" | ||
- "[<numeric_value_set>] [(<all>|<the>)] <light> [brightness] [to] <brightness> <here>" | ||
|
||
- "[<brightness_relative>] [[(<all>|<the>)] <light>] [<here>] [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.
Ouch! "Hey Nabu... 70%" 😅 Definitely no!
- "[<numeric_value_set>] [(<all>|<the>)] <light> [brightness] [to] <brightness> <here>" | ||
|
||
- "[<brightness_relative>] [[(<all>|<the>)] <light>] [<here>] [to] <brightness>" | ||
- "[<brightness_relative>] [[(<all>|<the>)] <light>] [to] <brightness> <here>" |
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.
Same thing, "70% here" is too vague.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
🤦♂️ I got a little carried away it seems. I need to split these to multiple sentences to make sure some of the optional are mutually exclusive. |
I've been trying to think of a good way to address this feedback and one of the things I'm coming to is possibly to break apart something like Because right now something like This does mean some possible less used sentences will creep in because there won't be mutual exclusivity between I'll make the refactor and we can debate another further split after. |
Oh! I just thought of an alternative that could avoid the vague matches like |
This should make the matching more robust and much easier to manage.
This depends on #2728 getting merged first.