-
Notifications
You must be signed in to change notification settings - Fork 523
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] Make shade queries more flexible for more generic requests #2221
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,33 +3,37 @@ intents: | |
HassGetState: | ||
data: | ||
- sentences: | ||
- "is <name> {cover_states:state} [in <area>]" | ||
- "is <name> {cover_states:state} [[(in|on) ](<area>|<floor>)]" | ||
response: one_yesno | ||
requires_context: | ||
domain: cover | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "(is|are) any {cover_classes:device_class} {cover_states:state} [in <area>]" | ||
- "(is|are) any {cover_classes:device_class} {cover_states:state} [[(in|on) ](<area>|<floor>)]" | ||
- "(is|are) any (<area>|<floor>) {cover_classes:device_class} {cover_states:state}" | ||
response: any | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "are all [the] {cover_classes:device_class} {cover_states:state} [in <area>]" | ||
- "are all [the] {cover_classes:device_class} {cover_states:state} [[(in|on) ](<area>|<floor>)]" | ||
- "are all [the] (<area>|<floor>) {cover_classes:device_class} {cover_states:state}" | ||
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These sentences also exceed the 80 character limit. Splitting these into multiple lines could enhance readability and maintainability. - "are all [the] {cover_classes:device_class} {cover_states:state} [[(in|on) ](<area>|<floor>)]"
- "are all [the] (<area>|<floor>) {cover_classes:device_class} {cover_states:state}"
+ "are all [the] {cover_classes:device_class} {cover_states:state} [[(in|on) ](<area>|<floor>)]" # Consider splitting this into multiple lines
+ "are all [the] (<area>|<floor>) {cover_classes:device_class} {cover_states:state}" # Consider splitting this into multiple lines
Toolsyamllint
|
||
response: all | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "(which|what) {cover_classes:device_class} (is|are) {cover_states:state} [in <area>]" | ||
- "(which|what) {cover_classes:device_class} (is|are) {cover_states:state} [[(in|on) ](<area>|<floor>)]" | ||
- "(which|what) (<area>|<floor>) {cover_classes:device_class} (is|are) {cover_states:state}" | ||
Comment on lines
+28
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The sentences effectively enhance query flexibility but exceed the recommended line length, potentially impacting readability. - "(which|what) {cover_classes:device_class} (is|are) {cover_states:state} [[(in|on) ](<area>|<floor>)]"
- "(which|what) (<area>|<floor>) {cover_classes:device_class} (is|are) {cover_states:state}"
+ "(which|what) {cover_classes:device_class} (is|are) {cover_states:state} [[(in|on) ](<area>|<floor>)]" # Consider splitting this into multiple lines
+ "(which|what) (<area>|<floor>) {cover_classes:device_class} (is|are) {cover_states:state}" # Consider splitting this into multiple lines
Toolsyamllint
|
||
response: which | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "how many {cover_classes:device_class} (is|are) {cover_states:state} [in <area>]" | ||
- "how many {cover_classes:device_class} (is|are) {cover_states:state} [[(in|on) ](<area>|<floor>)]" | ||
- "how many (<area>|<floor>) {cover_classes:device_class} (is|are) {cover_states:state}" | ||
Comment on lines
+35
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These sentences are too long per the linter's recommendations. Consider revising them to improve readability and maintain the width standard. - "how many {cover_classes:device_class} (is|are) {cover_states:state} [[(in|on) ](<area>|<floor>)]"
- "how many (<area>|<floor>) {cover_classes:device_class} (is|are) {cover_states:state}"
+ "how many {cover_classes:device_class} (is|are) {cover_states:state} [[(in|on) ](<area>|<floor>)]" # Consider splitting this into multiple lines
+ "how many (<area>|<floor>) {cover_classes:device_class} (is|are) {cover_states:state}" # Consider splitting this into multiple lines
Toolsyamllint
|
||
response: how_many | ||
slots: | ||
domain: cover |
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 new sentences greatly improve the flexibility of queries. However, both lines exceed the recommended 80 characters, affecting readability.
Tools
yamllint