-
Notifications
You must be signed in to change notification settings - Fork 526
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
[SV] support for scenes and persons #2172
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for the PR. Added some inline comments.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There is also a filename problem, where , is used instead of . (dot) for the file extension. |
Err in filename.
Err in filename.
Add missing zone in test.
I believe I have made the changes you asked for. |
A few small changew
📝 Walkthrough📝 WalkthroughWalkthroughThe changes introduce a new YAML configuration file for the Swedish language, specifically defining intents related to activating scenes in a home automation system. The primary intent, Changes
Sequence Diagram(s)Activating ScenessequenceDiagram
participant User
participant System
participant SceneController
User->>System: Activate scene Z
System->>SceneController: Send activation command for scene Z
SceneController-->>System: Acknowledge activation of scene Z
System-->>User: Confirm scene Z activation
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
tests/sv/scene_HassTurnOn.yaml (1)
3-13
: Consider enhancing the "Festläge" test case.The test case for "Festläge" is well-structured, but consider the following improvements:
- Add more sentence variations to cover a wider range of user inputs.
- Ensure consistency in terminology (e.g., "scene" vs "scenen").
- Consider adding a test case with a misspelled "Festläge" to check error handling.
Here's an example of additional sentences you could add:
- "sätt på festläge" - "aktivera festläge scenen" - "starta festläge i huset"sentences/sv/scene_HassTurnOn.yaml (1)
5-28
: Refine sentence patterns for clarity and consistency.The sentence patterns cover various ways to express turning on a scene, which is good for flexibility. However, there are a few points to consider:
- Some patterns might be redundant or could be combined for simplicity.
- There are extra spaces after
<slå_på>
in some patterns (lines 16, 19, 20).- The pattern
"[scene] <name> på"
on line 7 might be ambiguous without the<slå_på>
action.Consider the following improvements:
- Combine similar patterns to reduce redundancy.
- Remove extra spaces after
<slå_på>
for consistency.- Add the
<slå_på>
action to the pattern on line 7 for clarity.Example of combining patterns and removing extra spaces:
- "<slå_på> (<area> <name>|<name> <i_på> <area>) [scene]"
This combines several patterns into one, making the file more maintainable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- sentences/sv/scene_HassTurnOn.yaml (1 hunks)
- tests/sv/scene_HassTurnOn.yaml (1 hunks)
🧰 Additional context used
🔇 Additional comments (5)
tests/sv/scene_HassTurnOn.yaml (1)
1-2
: LGTM: File header and language specification are correct.The language is correctly specified as Swedish (sv), and the tests section is properly initiated.
sentences/sv/scene_HassTurnOn.yaml (4)
1-3
: LGTM: The overall structure of the YAML file is correct.The file follows the expected format for defining intents in YAML, with proper language specification and intent declaration.
10-13
: LGTM: Context and slot definitions are correct and consistent.The context and slot definitions for the "scene" domain are properly specified and consistent across both data blocks. This ensures correct categorization and processing of the intent.
Also applies to: 24-27
14-14
: LGTM: Response type is correctly specified.The response type is consistently set to "scene" for both data blocks, which aligns with the intent's purpose of turning on scenes. This ensures appropriate system responses for scene activation commands.
Also applies to: 28-28
1-28
: Overall, the file is well-structured and fit for purpose, with minor improvements suggested.The
sentences/sv/scene_HassTurnOn.yaml
file successfully defines intents for turning on scenes in Swedish. The file structure, context requirements, slot definitions, and response types are all correctly specified. The sentence patterns cover a wide range of user inputs, which is beneficial for flexibility.However, there are opportunities to refine the sentence patterns for improved clarity, consistency, and maintainability. Consider implementing the suggested improvements to the patterns, as mentioned in the previous comment.
To ensure that this file is properly integrated into the system, please run the following verification script:
This script will help verify the file's location, validate its YAML syntax (if yamllint is available), and check for any references to this file in test configurations.
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 have ran the test I belive are required and made changes to comply.
Changed to follow the set response.
By the last test run it seems that other parts of the responses are fixed in another PR |
When I run new builds, I do get one test error still for scenes, but more than that the test errors are regarding other parts than scene. Should I try to correct them too? I cant seem to understand why not climate response has a value? |
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.
Deleted files not related to scenes or persons.
Summary by CodeRabbit
New Features
HassTurnOn
for scene activation, allowing users to specify scenes and areas for enhanced control.Tests
HassTurnOn
intent in Swedish, ensuring accurate recognition and response for specific scenes, including "Festläge" and "Pluggtid."