-
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
[HU] Create homeassistant_HassGetCurrentTime.yaml #2339
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6baab4d
Create homeassistant_HassGetCurrentTime.yaml
nagyv 3e5aa83
Added timer related sentences
nagyv fdc03d5
Started fixing issues
nagyv a433f49
Prettier
nagyv 9dd7e31
Added tests to hu/homeassistant_HassGetCurrentTime.yaml
nagyv 98b2c77
HassCancelTimer and HassGetCurrentTime tests pass
nagyv 2103435
Surprising test failures
nagyv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
language: hu | ||
responses: | ||
intents: | ||
HassCancelTimer: | ||
default: "Időzítő törölve" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
language: hu | ||
responses: | ||
intents: | ||
HassGetCurrentTime: | ||
default: > | ||
{% set minute_str = '{0:02d}'.format(slots.time.minute) %} | ||
|
||
{{ slots.time.hour }}:{{ minute_str }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
language: hu | ||
responses: | ||
intents: | ||
HassPauseTimer: | ||
default: "Időzítő szünetel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
language: hu | ||
responses: | ||
intents: | ||
HassStartTimer: | ||
default: "Időzítő fut" | ||
command: "Vettem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
language: hu | ||
responses: | ||
intents: | ||
HassTimerStatus: | ||
default: | | ||
{% set num_timers = slots.timers | length %} | ||
{% set active_timers = slots.timers | selectattr('is_active') | list %} | ||
{% set num_active_timers = active_timers | length %} | ||
{% set paused_timers = slots.timers | rejectattr('is_active') | list %} | ||
{% set num_paused_timers = paused_timers | length %} | ||
{% set next_timer = None %} | ||
|
||
{% if num_timers == 0: %} | ||
Nincsenek időzítők. | ||
{% elif num_active_timers == 0: %} | ||
{# No active timers #} | ||
{% if num_paused_timers == 1: %} | ||
{% set next_timer = paused_timers[0] %} | ||
Az időzítő szünetel. | ||
{% else: %} | ||
{{ num_paused_timers }} szünetelő időzítő. | ||
{% endif %} | ||
{% else: %} | ||
{# At least one active timer #} | ||
{% if num_active_timers == 1: %} | ||
{% set next_timer = active_timers[0] %} | ||
{% else: %} | ||
{# Get active timer that will finish soonest #} | ||
{% set sorted_timers = active_timers | sort(attribute='total_seconds_left') %} | ||
{% set next_timer = sorted_timers[0] %} | ||
{{ num_active_timers }} időzítő fut. | ||
{% endif %} | ||
|
||
{% if num_paused_timers == 1: %} | ||
1 időzítő szünetel. | ||
{% elif num_paused_timers > 0: %} | ||
{{ num_paused_timers }} időzítő szünetel. | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if next_timer: %} | ||
{# At least one active timer #} | ||
{% if (next_timer.rounded_hours_left == 1) and (next_timer.rounded_minutes_left > 0): %} | ||
1 óra {{ next_timer.rounded_minutes_left }} perc | ||
{% elif (next_timer.rounded_hours_left == 1): %} | ||
1 óra | ||
{% elif (next_timer.rounded_hours_left > 1) and (next_timer.rounded_minutes_left > 0): %} | ||
{{ next_timer.rounded_hours_left }} óra {{ next_timer.rounded_minutes_left }} perc | ||
{% elif (next_timer.rounded_hours_left > 1): %} | ||
{{ next_timer.rounded_hours_left }} óra | ||
{% elif (next_timer.rounded_minutes_left == 1) and (next_timer.rounded_seconds_left > 0): %} | ||
1 perc {{ next_timer.rounded_seconds_left }} másodperc | ||
{% elif (next_timer.rounded_minutes_left == 1): %} | ||
1 perc | ||
{% elif (next_timer.rounded_minutes_left > 1) and (next_timer.rounded_seconds_left > 0): %} | ||
{{ next_timer.rounded_minutes_left }} perc {{ next_timer.rounded_seconds_left }} másodperc | ||
{% elif (next_timer.rounded_minutes_left > 1): %} | ||
{{ next_timer.rounded_minutes_left }} perc | ||
{% elif (next_timer.rounded_seconds_left == 1): %} | ||
1 másodperc | ||
{% elif (next_timer.rounded_seconds_left > 1): %} | ||
{{ next_timer.rounded_seconds_left }} másodperc | ||
{% endif %} | ||
|
||
{% if num_timers > 1: %} | ||
{# Give some extra information to disambiguate #} | ||
vam hátra a | ||
{% if (next_timer.start_hours > 0) and (next_timer.start_minutes > 0): %} | ||
{{ next_timer.start_hours }} óra {{ next_timer.start_minutes }} perces | ||
{% elif (next_timer.start_hours > 0): %} | ||
{{ next_timer.start_hours }} órás | ||
{% elif (next_timer.start_minutes > 0) and (next_timer.start_seconds > 0): %} | ||
{{ next_timer.start_minutes }} perc {{ next_timer.start_seconds }} másodperces | ||
{% elif (next_timer.start_minutes > 0): %} | ||
{{ next_timer.start_minutes }} perces | ||
{% elif (next_timer.start_seconds > 0): %} | ||
{{ next_timer.start_seconds }} másodperces | ||
{% endif %} | ||
|
||
{% if next_timer.name: %} | ||
{{ next_timer.name }} | ||
{% elif next_timer.area: %} | ||
{{ next_timer.area }} | ||
{% endif %} | ||
|
||
időzítőből. | ||
{% else: %} | ||
van hátra. | ||
{% endif %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
language: hu | ||
responses: | ||
intents: | ||
HassUnpauseTimer: | ||
default: "Időzítő újraindult" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
language: "hu" | ||
intents: | ||
HassCancelTimer: | ||
data: | ||
- sentences: | ||
- "<timer_cancel> az időzítőt" | ||
- "<timer_cancel> a visszaszámlálást" | ||
- "<timer_cancel> a[z] {timer_name:name} [nevű ]visszaszámlálás[t]" | ||
- "<timer_cancel> a[z] {timer_name:name} [nevű ]időzítő[t]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
language: hu | ||
intents: | ||
HassGetCurrentTime: | ||
data: | ||
- sentences: | ||
- "mennyi[ most] a pontos idő" | ||
- "mennyi[ most] az idő" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
language: "hu" | ||
intents: | ||
HassPauseTimer: | ||
data: | ||
- sentences: | ||
- "szüneteljen a visszaszámlálás" | ||
- "szüneteltesd a visszaszámlálást" | ||
- "szüneteljen a[z] {timer_name:name}[ nevű] visszaszámlálás" | ||
- "szüneteltesd a[z] {timer_name:name}[ nevű] visszaszámlálást" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
language: "hu" | ||
intents: | ||
HassStartTimer: | ||
data: | ||
- sentences: | ||
- "állíts [be ][egy ] időzítőt <timer_duration>" | ||
- "állíts [be ][egy ] {timer_name:name} időzítőt <timer_duration>" | ||
- "számolj vissza <timer_duration>" | ||
- "értesíts <timer_duration> múlva" | ||
response: command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
language: "hu" | ||
intents: | ||
HassTimerStatus: | ||
data: | ||
- sentences: | ||
- "időzítő(k) állapota" | ||
- "mennyi idő van még[ hátra| vissza]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
language: "hu" | ||
intents: | ||
HassUnpauseTimer: | ||
data: | ||
- sentences: | ||
- "folytasd a visszaszámlálást" | ||
- "folytasd[ a| az] {timer_name:name}[ nevű][ időzítőt| visszaszámlálást]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
language: hu | ||
tests: | ||
- sentences: | ||
- "állítsd le az időzítőt" | ||
- "állítsd le a visszaszámlálást" | ||
- "töröld az időzítőt" | ||
- "töröld a visszaszámlálást" | ||
intent: | ||
name: HassCancelTimer | ||
response: Időzítő törölve | ||
- sentences: | ||
- "állítsd le a főtt tojás nevű visszaszámlálást" | ||
- "töröld a főtt tojás nevű időzítőt" | ||
intent: | ||
name: HassCancelTimer | ||
slots: | ||
name: főtt tojás | ||
response: Időzítő törölve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: hu | ||
tests: | ||
- sentences: | ||
- "mennyi az idő" | ||
- "mennyi most az idő" | ||
- "mennyi a pontos idő" | ||
intent: | ||
name: HassGetCurrentTime | ||
response: "1:02" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: hu | ||
tests: | ||
- sentences: | ||
- "szüneteljen a visszaszámlálás" | ||
- "szüneteltesd a visszaszámlálást" | ||
intent: | ||
name: HassPauseTimer | ||
response: Időzítő szünetel | ||
- sentences: | ||
- "szüneteltesd a főtt tojás visszaszámlálást" | ||
- "szüneteljen a főtt tojás nevű visszaszámlálás" | ||
intent: | ||
name: HassPauseTimer | ||
slots: | ||
name: főtt tojás | ||
response: Időzítő szünetel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
language: hu | ||
tests: | ||
- sentences: | ||
- "állíts időzítőt 2 percre" | ||
- "állíts be időzítőt 2 percre" | ||
- "állíts egy időzítőt 2 percre" | ||
- "állíts be egy időzítőt 2 percre" | ||
- "számolj vissza 2 percet" | ||
- "számolj vissza 30 másodpercet" | ||
- "értesíts 2 perc múlva" | ||
intent: | ||
name: HassStartTimer | ||
slots: | ||
minutes: 2 | ||
response: Vettem | ||
- sentences: | ||
- "állíts egy főtt tojás időzítőt 2 percre" | ||
intent: | ||
name: HassStartTimer | ||
slots: | ||
minutes: 2 | ||
name: főtt tojás | ||
response: Vettem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
language: hu | ||
tests: | ||
- sentences: | ||
- "időzítők állapota" | ||
- "időzítő állapota" | ||
- "mennyi idő van még vissza" | ||
- "mennyi idő van még hátra" | ||
intent: | ||
name: HassTimerStatus | ||
response: | | ||
2 időzítő fut. 1 időzítő szünetel. 3 perc van hátra az 5 perces ebédlő időzítőből. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
language: hu | ||
tests: | ||
- sentences: | ||
- "folytasd a visszaszámlálást" | ||
intent: | ||
name: HassUnpauseTimer | ||
response: Időzítő újraindult | ||
- sentences: | ||
- "folytasd a főtt tojás nevű visszaszámlálást" | ||
- "folytasd a főtt tojás nevű időzítőt" | ||
intent: | ||
name: HassUnpauseTimer | ||
slots: | ||
name: főtt tojás | ||
response: Időzítő újraindult |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Consider using a dynamic response for the current time.
The response is currently a static time ("1:02"). For better accuracy, consider using a dynamic response that reflects the actual current time.