- 
                Notifications
    
You must be signed in to change notification settings  - Fork 628
 
[DE] Major rework of HassLightSet #3294
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
          
 I "discussed" this with myself again and i think maybe support for  
 to be recognized and the result would be exactly as expected as well as consistent with HassTurnOn/Off behavior. 
 and(when a slot context area is applied) result in the same as above whereas the same with   | 
    
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.
I'll leave this one for @mib1185 and @easterapps. My motivation for reviewing this monster of a PR is very low. I never change a light via Assist directly and only ever use scenes.
| out: 1 | ||
| brightness_level_max: | ||
| values: | ||
| - in: hell[ste] | 
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 only these 2 options and not the full set from <brightness_level>?
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.
my intention for this one was to use it in a context like
Wohnzimmer hell
and since brightness_level would then allow
Wohnzimmer volle
Wohnzimmer höchste
Wohnzimmer größte
...
i decided to use a smaller set of words for this special purpose...
But maybe i already have a better idea - i will add "Stufe" to the list from 'brightness_level' where needed. This will allow us to use all variations from brightness_level but without the unnecessary permutations.
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.
#3314
the new version got a little longer but covers all useful variations from {brightness_level} in the intended context.
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.
Hi @hecktech27
Many thanks for all your contributions in the last few weeks, that's awesome ❤️
Can we split this PR into smaller, independent chunks? This would make it much better reviewable.
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.
Accidentally clicked on comment instead of request change 🙈
| 
           I will have a Look at it tomorrow if i have any good ideas on how to split this up - currently only on my mobile... I might need some input from you on what would work for you @mib1185  | 
    
          
 @mib1185 I would really appreciate your opinion on this one so when I split this PR maybe we can skip one iteration of corrections Thanks and sorry for creating such a big PR - as i wrote above it was not planend for it to become that big but one thing led to the next.... I absolutely see why this is difficult to review!  | 
    
| 
           @mib1185 (@andreasbrett)  | 
    
oh well - this one escalated a little bit... to be honest i just wanted to optimize some sentences in HassLightSet but one optimization led to the next and here we are...
While I really tried to make sure not to lose any previously working sentences please really take your time to review this - since it ended up to be a complete rework of the file!
What´s in this PR:
optimizations of expansion rules in the "light"-context
a new expansion rule for
<hier>which I´d like to apply to other files in the future for a consistent user experienceI introduced
<floor>to every place needed in HassLightSet so you can now set lights by floorI applied
{brightness_level:brightness}to all variations of brightness controls so you can now control lights by "xy auf maximale Helligkeit" - context-aware so either name, satellite area, area or floor as a targetI introduced "hell" as a comand( also context-aware) so you can now quickly turn on lights by a command "Schlafzimmer hell" and all lights in Schlafzimmer will be on 100% regardless of the previously configured brightness
I tried to create a user-experience as consistent as possible so all sentences working for an area should be working for a floor as well as for the satellite´s area
I removed previously possible but not working slot combinations so hopefully no more "Es ist ein Fehler aufgetreten".
I >>removed<<
<alle_lichter>from all sentences where a slot-area is used since this allowed for sentences likeI decided to remove this option to be consistent with LightTurnOn/LightTurnOff where
<alle_lichter>turns off all lights everywhere(which is the reason for the only deleted test sentences). As far as I know there is no possibility to change all lights brightness/colors(please correct me if wrong!).While i removed
<alle_lichter>from "satellite-area / slot: area"-sentences there is still<lichter>since this does not imply that all lights everywhere are changed. So "Lichter auf 10% dimmen" still works.Happy to discuss this decision! 😊
to make sure i do not lose any previously working sentences i made extensive use of test-sentences for this file.
And the cherry on top:
all the added functionality led to a drop in overall sentence count by another 5 million 😇