diff --git a/responses/hu/HassCancelTimer.yaml b/responses/hu/HassCancelTimer.yaml new file mode 100644 index 0000000000..410d32564b --- /dev/null +++ b/responses/hu/HassCancelTimer.yaml @@ -0,0 +1,6 @@ +--- +language: hu +responses: + intents: + HassCancelTimer: + default: "Időzítő törölve" diff --git a/responses/hu/HassGetCurrentTime.yaml b/responses/hu/HassGetCurrentTime.yaml new file mode 100644 index 0000000000..1177e50754 --- /dev/null +++ b/responses/hu/HassGetCurrentTime.yaml @@ -0,0 +1,8 @@ +language: hu +responses: + intents: + HassGetCurrentTime: + default: > + {% set minute_str = '{0:02d}'.format(slots.time.minute) %} + + {{ slots.time.hour }}:{{ minute_str }} diff --git a/responses/hu/HassPauseTimer.yaml b/responses/hu/HassPauseTimer.yaml new file mode 100644 index 0000000000..ced36aec41 --- /dev/null +++ b/responses/hu/HassPauseTimer.yaml @@ -0,0 +1,6 @@ +--- +language: hu +responses: + intents: + HassPauseTimer: + default: "Időzítő szünetel" diff --git a/responses/hu/HassStartTimer.yaml b/responses/hu/HassStartTimer.yaml new file mode 100644 index 0000000000..c58cac4e47 --- /dev/null +++ b/responses/hu/HassStartTimer.yaml @@ -0,0 +1,7 @@ +--- +language: hu +responses: + intents: + HassStartTimer: + default: "Időzítő fut" + command: "Vettem" diff --git a/responses/hu/HassTimerStatus.yaml b/responses/hu/HassTimerStatus.yaml new file mode 100644 index 0000000000..8b95914c40 --- /dev/null +++ b/responses/hu/HassTimerStatus.yaml @@ -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 %} diff --git a/responses/hu/HassUnpauseTimer.yaml b/responses/hu/HassUnpauseTimer.yaml new file mode 100644 index 0000000000..7aaef486b6 --- /dev/null +++ b/responses/hu/HassUnpauseTimer.yaml @@ -0,0 +1,6 @@ +--- +language: hu +responses: + intents: + HassUnpauseTimer: + default: "Időzítő újraindult" diff --git a/sentences/hu/_common.yaml b/sentences/hu/_common.yaml index 2304e27b33..79d1e32f95 100644 --- a/sentences/hu/_common.yaml +++ b/sentences/hu/_common.yaml @@ -596,6 +596,30 @@ lists: - in: "Távol" out: "not_home" + # timer + timer_seconds: + range: + from: 1 + to: 100 + timer_minutes: + range: + from: 1 + to: 100 + timer_hours: + range: + from: 1 + to: 100 + timer_half: + values: + - in: "fél" + out: 30 + - in: "1/2" + out: 30 + timer_name: + wildcard: true + timer_command: + wildcard: true + expansion_rules: name: "[a |az ]{name}[| ]" name_ragok: "(n(a|e)k|[o|e]t|r(a|e)|[o|e|ö]n)" @@ -648,6 +672,13 @@ expansion_rules: #kérédések what_is_the_class_of_name: "( [amit] [a|e|n(a|e)k] [szenzor[a|nak|on]|érzékelő[je|nek|n]|eszköz[e|nek|ön]|esemény[nek]] [mér[t]|mutat[ott]] []| ( [szenzor[a|on]|érzékelő[je|n]|eszköz[ön]] [által] [mért|mutatott] [értéke]; []))" + # időzítő + timer_duration_seconds: "{timer_seconds:seconds} másodperc[re|et]" + timer_duration_minutes: "{timer_minutes:minutes} perc[re|et][ [és ]{timer_seconds:seconds} másodperc[re|et]]" + timer_duration_hours: "{timer_hours:hours} órá[t|ra][ [és ]{timer_minutes:minutes} perc[re|et]][ [és ]{timer_seconds:seconds} másodperc[re|et]]" + timer_duration: "||" + timer_cancel: "[állítsd le|töröld]" + skip_words: - "kérem [szépen]" - "kérlek [szépen]" diff --git a/sentences/hu/homeassistant_HassCancelTimer.yaml b/sentences/hu/homeassistant_HassCancelTimer.yaml new file mode 100644 index 0000000000..1729a5696b --- /dev/null +++ b/sentences/hu/homeassistant_HassCancelTimer.yaml @@ -0,0 +1,10 @@ +--- +language: "hu" +intents: + HassCancelTimer: + data: + - sentences: + - " az időzítőt" + - " a visszaszámlálást" + - " a[z] {timer_name:name} [nevű ]visszaszámlálás[t]" + - " a[z] {timer_name:name} [nevű ]időzítő[t]" diff --git a/sentences/hu/homeassistant_HassGetCurrentTime.yaml b/sentences/hu/homeassistant_HassGetCurrentTime.yaml new file mode 100644 index 0000000000..eac953cdcd --- /dev/null +++ b/sentences/hu/homeassistant_HassGetCurrentTime.yaml @@ -0,0 +1,7 @@ +language: hu +intents: + HassGetCurrentTime: + data: + - sentences: + - "mennyi[ most] a pontos idő" + - "mennyi[ most] az idő" diff --git a/sentences/hu/homeassistant_HassPauseTimer.yaml b/sentences/hu/homeassistant_HassPauseTimer.yaml new file mode 100644 index 0000000000..e51b9b4c78 --- /dev/null +++ b/sentences/hu/homeassistant_HassPauseTimer.yaml @@ -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" diff --git a/sentences/hu/homeassistant_HassStartTimer.yaml b/sentences/hu/homeassistant_HassStartTimer.yaml new file mode 100644 index 0000000000..75a34a1264 --- /dev/null +++ b/sentences/hu/homeassistant_HassStartTimer.yaml @@ -0,0 +1,11 @@ +--- +language: "hu" +intents: + HassStartTimer: + data: + - sentences: + - "állíts [be ][egy ] időzítőt " + - "állíts [be ][egy ] {timer_name:name} időzítőt " + - "számolj vissza " + - "értesíts múlva" + response: command diff --git a/sentences/hu/homeassistant_HassTimerStatus.yaml b/sentences/hu/homeassistant_HassTimerStatus.yaml new file mode 100644 index 0000000000..59c697be24 --- /dev/null +++ b/sentences/hu/homeassistant_HassTimerStatus.yaml @@ -0,0 +1,8 @@ +--- +language: "hu" +intents: + HassTimerStatus: + data: + - sentences: + - "időzítő(k) állapota" + - "mennyi idő van még[ hátra| vissza]" diff --git a/sentences/hu/homeassistant_HassUnpauseTimer.yaml b/sentences/hu/homeassistant_HassUnpauseTimer.yaml new file mode 100644 index 0000000000..eacf7e4b84 --- /dev/null +++ b/sentences/hu/homeassistant_HassUnpauseTimer.yaml @@ -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]" diff --git a/tests/hu/_fixtures.yaml b/tests/hu/_fixtures.yaml index 88fb4bde4d..0e42af2d81 100644 --- a/tests/hu/_fixtures.yaml +++ b/tests/hu/_fixtures.yaml @@ -716,3 +716,23 @@ entities: - name: "consuela" id: "vacuum.consuela" state: "idle" + +timers: + - is_active: false + start_hours: 1 + total_seconds_left: 100 + rounded_hours_left: 0 + rounded_minutes_left: 1 + rounded_seconds_left: 40 + - name: "főtt tojás" + start_minutes: 30 + total_seconds_left: 1505 + rounded_hours_left: 0 + rounded_minutes_left: 25 + rounded_seconds_left: 0 + - area: "ebédlő" + start_minutes: 5 + total_seconds_left: 190 + rounded_hours_left: 0 + rounded_minutes_left: 3 + rounded_seconds_left: 0 diff --git a/tests/hu/homeassistant_HassCancelTimer.yaml b/tests/hu/homeassistant_HassCancelTimer.yaml new file mode 100644 index 0000000000..56476b49ad --- /dev/null +++ b/tests/hu/homeassistant_HassCancelTimer.yaml @@ -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 diff --git a/tests/hu/homeassistant_HassGetCurrentTime.yaml b/tests/hu/homeassistant_HassGetCurrentTime.yaml new file mode 100644 index 0000000000..7a12aaaf5d --- /dev/null +++ b/tests/hu/homeassistant_HassGetCurrentTime.yaml @@ -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" diff --git a/tests/hu/homeassistant_HassPauseTimer.yaml b/tests/hu/homeassistant_HassPauseTimer.yaml new file mode 100644 index 0000000000..f90493f211 --- /dev/null +++ b/tests/hu/homeassistant_HassPauseTimer.yaml @@ -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 diff --git a/tests/hu/homeassistant_HassStartTimer.yaml b/tests/hu/homeassistant_HassStartTimer.yaml new file mode 100644 index 0000000000..6a6a2eeae0 --- /dev/null +++ b/tests/hu/homeassistant_HassStartTimer.yaml @@ -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 diff --git a/tests/hu/homeassistant_HassTimerStatus.yaml b/tests/hu/homeassistant_HassTimerStatus.yaml new file mode 100644 index 0000000000..ae2ad63105 --- /dev/null +++ b/tests/hu/homeassistant_HassTimerStatus.yaml @@ -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. diff --git a/tests/hu/homeassistant_HassUnpauseTimer.yaml b/tests/hu/homeassistant_HassUnpauseTimer.yaml new file mode 100644 index 0000000000..6a3d38d1da --- /dev/null +++ b/tests/hu/homeassistant_HassUnpauseTimer.yaml @@ -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