home-assistant / intents

Intents to be used with Home Assistant
https://developers.home-assistant.io/docs/voice/overview/
Creative Commons Attribution 4.0 International
444 stars 503 forks source link

[HU] Create homeassistant_HassGetCurrentTime.yaml #2339

Open nagyv opened 1 month ago

nagyv commented 1 month ago

Summary by CodeRabbit

coderabbitai[bot] commented 1 month ago
Walkthrough ## Walkthrough The update enhances the Home Assistant platform with new intents focused on timer functionalities and current time querying in Hungarian. The intents—`HassGetCurrentTime`, `HassCancelTimer`, `HassPauseTimer`, `HassStartTimer`, `HassTimerStatus`, and `HassUnpauseTimer`—feature localized sentence variations, improving user interactions through natural language processing. This enhancement significantly boosts system responsiveness and user experience for Hungarian speakers. ## Changes | Files | Change Summary | |----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| | `sentences/hu/homeassistant_HassGetCurrentTime.yaml` | New intent `HassGetCurrentTime` added for querying the current time with localized Hungarian sentences. | | `sentences/hu/homeassistant_HassCancelTimer.yaml`, | New intent `HassCancelTimer` defined with flexible phrases for canceling timers. | | `sentences/hu/homeassistant_HassPauseTimer.yaml`, | New intent `HassPauseTimer` created with variations for pausing timers in Hungarian. | | `sentences/hu/homeassistant_HassStartTimer.yaml`, | New intent `HassStartTimer` defined with templates for starting timers, including placeholders for duration and names. | | `sentences/hu/homeassistant_HassTimerStatus.yaml`, | New intent `HassTimerStatus` introduced to inquire about timer statuses in Hungarian. | | `sentences/hu/homeassistant_HassUnpauseTimer.yaml` | New intent `HassUnpauseTimer` defined for resuming paused timers. | | `responses/hu/HassGetCurrentTime.yaml`, | New response template for `HassGetCurrentTime`, providing localized time formatting in Hungarian. | | `responses/hu/HassCancelTimer.yaml`, | New default response "Időzítő törölve" for `HassCancelTimer` intent. | | `responses/hu/HassPauseTimer.yaml`, | New response "Időzítő szünetel" for `HassPauseTimer` intent. | | `responses/hu/HassStartTimer.yaml`, | New responses "Időzítő fut" and "Vettem" for `HassStartTimer` intent. | | `responses/hu/HassTimerStatus.yaml`, | New response structure for `HassTimerStatus`, detailing active and paused timer statuses. | | `responses/hu/HassUnpauseTimer.yaml`, | New response "Időzítő újraindult" for `HassUnpauseTimer` intent. | | `tests/hu/homeassistant_HassCancelTimer.yaml`, | New tests for `HassCancelTimer` with scenarios for stopping timers. | | `tests/hu/homeassistant_HassGetCurrentTime.yaml`, | New tests for `HassGetCurrentTime` with various time inquiry phrases. | | `tests/hu/homeassistant_HassPauseTimer.yaml`, | New tests for `HassPauseTimer` with commands to pause timers. | | `tests/hu/homeassistant_HassStartTimer.yaml`, | New tests for `HassStartTimer` to initiate timers with varying inputs. | | `tests/hu/homeassistant_HassTimerStatus.yaml`, | New tests for `HassTimerStatus` to check timer states. | | `tests/hu/homeassistant_HassUnpauseTimer.yaml`, | New tests for `HassUnpauseTimer` with commands to resume timers. | | `sentences/hu/_common.yaml` | Added common timer configurations, including ranges for seconds, minutes, hours, and wildcard entries for dynamic timer names and commands. | | `tests/hu/_fixtures.yaml` | New section for timer objects, enhancing management and tracking of multiple timers. | ## Sequence Diagram(s) ```mermaid sequenceDiagram participant User participant HomeAssistant User->>HomeAssistant: "Mondd meg mennyi az idő." HomeAssistant-->>User: "A pontos idő: [current time]." User->>HomeAssistant: "Állítsd le az időzítőt." HomeAssistant-->>User: "Az időzítő leállítva." User->>HomeAssistant: "Szüneteltesd az időzítőt." HomeAssistant-->>User: "Az időzítő szünetel." User->>HomeAssistant: "Indítsd el az időzítőt 10 percig." HomeAssistant-->>User: "Az időzítő 10 percre elindult." User->>HomeAssistant: "Mi az időzítő állapota?" HomeAssistant-->>User: "Az időzítő állapota: [status]." User->>HomeAssistant: "Folytasd az időzítőt." HomeAssistant-->>User: "Az időzítő folytatva." ```

Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between 3e5aa831b97b4af9d376a6bcc9a29a244fd1c936 and 21034353b2662a4cda37de6763a576108f762cf5.
Files selected for processing (20) * responses/hu/HassCancelTimer.yaml (1 hunks) * responses/hu/HassGetCurrentTime.yaml (1 hunks) * responses/hu/HassPauseTimer.yaml (1 hunks) * responses/hu/HassStartTimer.yaml (1 hunks) * responses/hu/HassTimerStatus.yaml (1 hunks) * responses/hu/HassUnpauseTimer.yaml (1 hunks) * sentences/hu/_common.yaml (2 hunks) * sentences/hu/homeassistant_HassCancelTimer.yaml (1 hunks) * sentences/hu/homeassistant_HassGetCurrentTime.yaml (1 hunks) * sentences/hu/homeassistant_HassPauseTimer.yaml (1 hunks) * sentences/hu/homeassistant_HassStartTimer.yaml (1 hunks) * sentences/hu/homeassistant_HassTimerStatus.yaml (1 hunks) * sentences/hu/homeassistant_HassUnpauseTimer.yaml (1 hunks) * tests/hu/_fixtures.yaml (1 hunks) * tests/hu/homeassistant_HassCancelTimer.yaml (1 hunks) * tests/hu/homeassistant_HassGetCurrentTime.yaml (1 hunks) * tests/hu/homeassistant_HassPauseTimer.yaml (1 hunks) * tests/hu/homeassistant_HassStartTimer.yaml (1 hunks) * tests/hu/homeassistant_HassTimerStatus.yaml (1 hunks) * tests/hu/homeassistant_HassUnpauseTimer.yaml (1 hunks)
Files skipped from review due to trivial changes (9) * responses/hu/HassCancelTimer.yaml * responses/hu/HassGetCurrentTime.yaml * responses/hu/HassPauseTimer.yaml * responses/hu/HassStartTimer.yaml * responses/hu/HassUnpauseTimer.yaml * sentences/hu/homeassistant_HassCancelTimer.yaml * sentences/hu/homeassistant_HassGetCurrentTime.yaml * sentences/hu/homeassistant_HassPauseTimer.yaml * sentences/hu/homeassistant_HassUnpauseTimer.yaml
Files skipped from review as they are similar to previous changes (2) * sentences/hu/homeassistant_HassStartTimer.yaml * sentences/hu/homeassistant_HassTimerStatus.yaml
Additional comments not posted (24)
tests/hu/homeassistant_HassGetCurrentTime.yaml (2)
`1-1`: **LGTM! The language specification is correctly defined.** The `language: hu` line correctly specifies the language as Hungarian. --- `2-8`: **LGTM! The sentences and intent are correctly defined.** The sentences for querying the current time and the intent name `HassGetCurrentTime` are appropriate.
tests/hu/homeassistant_HassTimerStatus.yaml (3)
`1-1`: **LGTM! The language specification is correctly defined.** The `language: hu` line correctly specifies the language as Hungarian. --- `2-9`: **LGTM! The sentences and intent are correctly defined.** The sentences for querying timer status and the intent name `HassTimerStatus` are appropriate. --- `10-11`: **LGTM! The response is detailed and appropriate.** The response provides a detailed status of the timers, which is appropriate for the `HassTimerStatus` intent.
tests/hu/homeassistant_HassUnpauseTimer.yaml (3)
`1-1`: **LGTM! The language specification is correctly defined.** The `language: hu` line correctly specifies the language as Hungarian. --- `2-7`: **LGTM! The sentences and intent are correctly defined.** The sentences for unpausing a timer and the intent name `HassUnpauseTimer` are appropriate. --- `8-15`: **LGTM! The slot and responses are correctly defined.** The slot for the timer name and the responses for the `HassUnpauseTimer` intent are appropriate.
tests/hu/homeassistant_HassPauseTimer.yaml (3)
`1-3`: **LGTM! Language specification and test structure are correct.** The language is specified as Hungarian, and the test structure includes sentences, intents, and responses. --- `4-8`: **LGTM! First test case is correct.** The sentences, intent name, and response for pausing a timer are appropriate. --- `9-16`: **LGTM! Second test case is correct.** The sentences, intent name, slots, and response for pausing a specific timer are appropriate.
tests/hu/homeassistant_HassCancelTimer.yaml (3)
`1-3`: **LGTM! Language specification and test structure are correct.** The language is specified as Hungarian, and the test structure includes sentences, intents, and responses. --- `4-10`: **LGTM! First test case is correct.** The sentences, intent name, and response for canceling a timer are appropriate. --- `11-18`: **LGTM! Second test case is correct.** The sentences, intent name, slots, and response for canceling a specific timer are appropriate.
tests/hu/homeassistant_HassStartTimer.yaml (3)
`1-3`: **LGTM! Language specification and test structure are correct.** The language is specified as Hungarian, and the test structure includes sentences, intents, and responses. --- `4-15`: **LGTM! First test case is correct.** The sentences, intent name, slots, and response for starting a timer are appropriate. --- `16-23`: **LGTM! Second test case is correct.** The sentences, intent name, slots, and response for starting a specific timer are appropriate.
responses/hu/HassTimerStatus.yaml (3)
`14-40`: **Verify the coverage of all possible timer states.** Ensure that all possible states of timers are covered and the responses are accurate.
Verification successful --- **Verify the coverage of all possible timer states.** Ensure that all possible states of timers are covered and the responses are accurate in the Hungarian version of `HassTimerStatus`.
Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the coverage of all possible timer states in the codebase. # Test: Search for the handling of different timer states. Expect: All possible states are covered. rg --type yaml -A 5 'HassTimerStatus' ``` Length of output: 27880
--- `42-90`: **Verify the coverage of all possible time formats.** Ensure that all possible time formats for the next timer are covered and the responses are accurate.
Verification successful --- **Verify the coverage of all possible time formats.** The code in `responses/hu/HassTimerStatus.yaml` adequately covers all possible time formats for the next timer, ensuring accurate responses. - The conditions check for various combinations of hours, minutes, and seconds. - Similar patterns are found in other language files, indicating consistent logic.
Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the coverage of all possible time formats in the codebase. # Test: Search for the formatting of remaining time for the next timer. Expect: All possible time formats are covered. rg --type yaml -A 5 'next_timer' ``` Length of output: 65486
--- `7-11`: **Verify the structure of `slots.timers`.** Ensure that `slots.timers` is always defined and contains the expected structure to avoid runtime errors.
tests/hu/_fixtures.yaml (1)
`720-738`: **Verify the consistency and accuracy of timer attributes.** Ensure that the timer attributes are consistent and accurate.
sentences/hu/_common.yaml (3)
`618-621`: **Verify the appropriate usage of wildcard entries.** Ensure that the wildcard entries for `timer_name` and `timer_command` are used appropriately and do not cause any conflicts. --- `676-680`: **Verify the accuracy and coverage of expansion rules.** Ensure that the expansion rules for timer durations and cancellation commands are accurate and cover all possible scenarios. --- `600-617`: **Verify the appropriateness and accuracy of timer ranges and values.** Ensure that the ranges and values for timers are appropriate and accurate.
Verification successful --- **The timer ranges and values are appropriate and accurate.** The timer configurations (`timer_seconds`, `timer_minutes`, `timer_hours`, and `timer_half`) are consistently defined across multiple language files with appropriate ranges and values. - `timer_seconds`, `timer_minutes`, and `timer_hours` all have a range from 1 to 100. - `timer_half` values are correctly mapped to 30.
Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the appropriateness and accuracy of timer ranges and values in the codebase. # Test: Search for the definition and usage of timer ranges and values. Expect: Appropriate and accurate ranges and values. rg --type yaml -A 5 'timer_seconds\|timer_minutes\|timer_hours\|timer_half' ``` Length of output: 77 --- Script: ```shell #!/bin/bash # Description: Verify the appropriateness and accuracy of timer ranges and values in the codebase. # Search for the definition and usage of timer ranges and values in YAML files. rg --type yaml 'timer_seconds\|timer_minutes\|timer_hours\|timer_half' # Search for the definition and usage of timer ranges and values in other relevant files. rg 'timer_seconds\|timer_minutes\|timer_hours\|timer_half' ``` Length of output: 133 --- Script: ```shell #!/bin/bash # Description: Verify the appropriateness and accuracy of timer ranges and values in the codebase. # Search for the definition and usage of timer_seconds in YAML files. rg --type yaml -A 10 'timer_seconds' # Search for the definition and usage of timer_minutes in YAML files. rg --type yaml -A 10 'timer_minutes' # Search for the definition and usage of timer_hours in YAML files. rg --type yaml -A 10 'timer_hours' # Search for the definition and usage of timer_half in YAML files. rg --type yaml -A 10 'timer_half' # Search for the definition and usage of timer_seconds in other relevant files. rg -A 10 'timer_seconds' # Search for the definition and usage of timer_minutes in other relevant files. rg -A 10 'timer_minutes' # Search for the definition and usage of timer_hours in other relevant files. rg -A 10 'timer_hours' # Search for the definition and usage of timer_half in other relevant files. rg -A 10 'timer_half' ``` Length of output: 133661
--- 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?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` 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 as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
v1k70rk4 commented 1 month ago

@nagyv Szervusz,

örülök, hogy belekezdtél a fordításba :) De itt sok mindent kell még javítani.

nagyv commented 1 month ago

@v1k70rk4 Szia! Tegnap már elkezdtem utánaolvasni a teszteknek, meg úgy általában az egész repo struktúrájának. Most megpróbáltam minden hiányzó elemet a helyére rakni, de mint láthatod, a tesztek elhasalnak. (Legalábbis nálam, localban.)

Megköszönnék egy kis segítséget, mert szerintem ezeknek zöldre kellene futniuk.

v1k70rk4 commented 1 month ago

Szia, akkor gyűjtöm a hibalistát: ./script/test --language=hu ezzel tudod gyorsítani a tesztet :) Mert lemegy a nap amíg az összes lefut.

Mostantól leszek sűrűbben, csak betegeskedtem egy kört. :(