Skip to content
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

[DE] Add timer length and name to responses #2513

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion responses/de/HassDecreaseTimer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ language: de
responses:
intents:
HassDecreaseTimer:
default: "Timer aktualisiert"
default: >
{% set h = slots.hours if slots.hours is defined else none %}
{% set m = slots.minutes if slots.minutes is defined else none %}
{% set s = slots.seconds if slots.seconds is defined else none %}
{% set h_text = h ~ (' Stunde' if h in [ "1", 'eine'] else ' Stunden') if h else '' %}
{% set m_text = m ~ (' Minute' if m in [ "1", 'eine'] else ' Minuten') if m else '' %}
{% set s_text = s ~ (' Sekunde' if s in [ "1", 'eine'] else ' Sekunden') if s else '' %}
{% set text_list = [ h_text, m_text, s_text] | select() | list %}
{% set text = text_list[:-1] | join(', ') ~ ' und ' ~ text_list[-1] if text_list | count > 2 else text_list | join(' und ') %}
{% set name = (' namens ' ~ slots.name | trim) if slots.name is defined else '' %}
Timer{{ name }} um {{ text }} verringert
12 changes: 11 additions & 1 deletion responses/de/HassIncreaseTimer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ language: de
responses:
intents:
HassIncreaseTimer:
default: "Timer aktualisiert"
default: >
{% set h = slots.hours if slots.hours is defined else none %}
{% set m = slots.minutes if slots.minutes is defined else none %}
{% set s = slots.seconds if slots.seconds is defined else none %}
{% set h_text = h ~ (' Stunde' if h in [ "1", 'eine'] else ' Stunden') if h else '' %}
{% set m_text = m ~ (' Minute' if m in [ "1", 'eine'] else ' Minuten') if m else '' %}
{% set s_text = s ~ (' Sekunde' if s in [ "1", 'eine'] else ' Sekunden') if s else '' %}
{% set text_list = [ h_text, m_text, s_text] | select() | list %}
{% set text = text_list[:-1] | join(', ') ~ ' und ' ~ text_list[-1] if text_list | count > 2 else text_list | join(' und ') %}
{% set name = (' namens ' ~ slots.name | trim) if slots.name is defined else '' %}
Timer{{ name }} um {{ text }} verlängert
23 changes: 21 additions & 2 deletions responses/de/HassStartTimer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,24 @@ language: de
responses:
intents:
HassStartTimer:
default: "Timer gestartet"
command: "Anweisung erhalten"
default: >
{% set h = slots.hours if slots.hours is defined else none %}
{% set m = slots.minutes if slots.minutes is defined else none %}
{% set s = slots.seconds if slots.seconds is defined else none %}
{% set h_text = h ~ (' Stunde' if h in [ "1", 'eine'] else ' Stunden') if h else '' %}
{% set m_text = m ~ (' Minute' if m in [ "1", 'eine'] else ' Minuten') if m else '' %}
{% set s_text = s ~ (' Sekunde' if s in [ "1", 'eine'] else ' Sekunden') if s else '' %}
{% set text_list = [ h_text, m_text, s_text] | select() | list %}
{% set text = text_list[:-1] | join(', ') ~ ' und ' ~ text_list[-1] if text_list | count > 2 else text_list | join(' und ') %}
{% set name = (' namens ' ~ slots.name | trim) if slots.name is defined else '' %}
Timer{{ name }} für {{ text }} gestartet
command: >
{% set h = slots.hours if slots.hours is defined else none %}
{% set m = slots.minutes if slots.minutes is defined else none %}
{% set s = slots.seconds if slots.seconds is defined else none %}
{% set h_text = h ~ (' Stunde' if h in [ "1", 'eine'] else ' Stunden') if h else '' %}
{% set m_text = m ~ (' Minute' if m in [ "1", 'eine'] else ' Minuten') if m else '' %}
{% set s_text = s ~ (' Sekunde' if s in [ "1", 'eine'] else ' Sekunden') if s else '' %}
{% set text_list = [ h_text, m_text, s_text] | select() | list %}
{% set text = text_list[:-1] | join(', ') ~ ' and ' ~ text_list[-1] if text_list | count > 2 else text_list | join(' and ') %}
Anweisung wird in {{ text }} ausgeführt
74 changes: 70 additions & 4 deletions tests/de/homeassistant_HassDecreaseTimer.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,80 @@
---
language: de
tests:
- sentences:
- "verkürze meinen Timer um 1 Sekunde"
- "verringere meinen Timer um 1 Sekunde"
intent:
name: HassDecreaseTimer
slots:
seconds: 1
response: Timer um 1 Sekunde verringert

- sentences:
- "verkürze meinen Timer um 1 Minute"
- "verringere meinen Timer um 1 Minute"
intent:
name: HassDecreaseTimer
slots:
minutes: 1
response: Timer um 1 Minute verringert

- sentences:
- "verkürze meinen Timer um 1 Stunde"
- "verringere meinen Timer um 1 Stunde"
intent:
name: HassDecreaseTimer
slots:
hours: 1
response: Timer um 1 Stunde verringert

- sentences:
- "verkürze meinen Timer um 5 Sekunden"
- "verringere meinen Timer um 5 Sekunden"
intent:
name: HassDecreaseTimer
slots:
seconds: 5
response: Timer um 5 Sekunden verringert

- sentences:
- "verkürze meinen Timer um 5 Minuten"
- "verringere meinen Timer um 5 Minuten"
intent:
name: HassDecreaseTimer
slots:
minutes: 5
response: Timer aktualisiert
response: Timer um 5 Minuten verringert

- sentences:
- "verkürze meinen Timer um 5 Stunden"
- "verringere meinen Timer um 5 Stunden"
intent:
name: HassDecreaseTimer
slots:
hours: 5
response: Timer um 5 Stunden verringert

- sentences:
- "verkürze meinen Timer um 2 Stunden und 5 Minuten"
- "verringere meinen Timer um 2 Stunden und 5 Minuten"
intent:
name: HassDecreaseTimer
slots:
hours: 2
minutes: 5
response: Timer um 2 Stunden und 5 Minuten verringert

- sentences:
- "verkürze meinen Timer um 2 Stunden, 5 Minuten und 30 Sekunden"
- "verringere meinen Timer um 2 Stunden, 5 Minuten und 30 Sekunden"
intent:
name: HassDecreaseTimer
slots:
hours: 2
minutes: 5
seconds: 30
response: Timer um 2 Stunden, 5 Minuten und 30 Sekunden verringert

- sentences:
- "verkürze 1 Stunde Timer um 5 Minuten"
Expand All @@ -20,7 +86,7 @@ tests:
slots:
minutes: 5
start_hours: 1
response: Timer aktualisiert
response: Timer um 5 Minuten verringert

- sentences:
- "verkürze Pizza Timer um 5 Minuten"
Expand All @@ -33,7 +99,7 @@ tests:
minutes: 5
name:
- "Pizza"
response: Timer aktualisiert
response: Timer namens Pizza um 5 Minuten verringert

- sentences:
- "verkürze Timer im Wohnzimmer um 5 Minuten"
Expand All @@ -45,4 +111,4 @@ tests:
slots:
minutes: 5
area: Wohnzimmer
response: Timer aktualisiert
response: Timer um 5 Minuten verringert
67 changes: 63 additions & 4 deletions tests/de/homeassistant_HassIncreaseTimer.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,72 @@
---
language: de
tests:
- sentences:
- "verlängere meinen Timer um 1 Sekunde"
intent:
name: HassIncreaseTimer
slots:
seconds: 1
response: Timer um 1 Sekunde verlängert

- sentences:
- "verlängere meinen Timer um 1 Minute"
intent:
name: HassIncreaseTimer
slots:
minutes: 1
response: Timer um 1 Minute verlängert

- sentences:
- "verlängere meinen Timer um 1 Stunde"
intent:
name: HassIncreaseTimer
slots:
hours: 1
response: Timer um 1 Stunde verlängert

- sentences:
- "verlängere meinen Timer um 5 Sekunden"
intent:
name: HassIncreaseTimer
slots:
seconds: 5
response: Timer um 5 Sekunden verlängert

- sentences:
- "verlängere meinen Timer um 5 Minuten"
intent:
name: HassIncreaseTimer
slots:
minutes: 5
response: Timer aktualisiert
response: Timer um 5 Minuten verlängert

- sentences:
- "verlängere meinen Timer um 5 Stunden"
intent:
name: HassIncreaseTimer
slots:
hours: 5
response: Timer um 5 Stunden verlängert

- sentences:
- "verlängere meinen Timer um 2 Stunden und 5 Minuten"
intent:
name: HassIncreaseTimer
slots:
hours: 2
minutes: 5
response: Timer um 2 Stunden und 5 Minuten verlängert

- sentences:
- "verlängere meinen Timer um 2 Stunden, 5 Minuten und 30 Sekunden"
intent:
name: HassIncreaseTimer
slots:
hours: 2
minutes: 5
seconds: 30
response: Timer um 2 Stunden, 5 Minuten und 30 Sekunden verlängert

- sentences:
- "verlängere 1 Stunde Timer um 5 Minuten"
Expand All @@ -17,7 +76,7 @@ tests:
slots:
minutes: 5
start_hours: 1
response: Timer aktualisiert
response: Timer um 5 Minuten verlängert

- sentences:
- "verlängere Pizza Timer um 5 Minuten"
Expand All @@ -28,7 +87,7 @@ tests:
minutes: 5
name:
- "Pizza"
response: Timer aktualisiert
response: Timer namens Pizza um 5 Minuten verlängert

- sentences:
- "verlängere Timer im Wohnzimmer um 5 Minuten"
Expand All @@ -38,4 +97,4 @@ tests:
slots:
minutes: 5
area: Wohnzimmer
response: Timer aktualisiert
response: Timer um 5 Minuten verlängert
20 changes: 10 additions & 10 deletions tests/de/homeassistant_HassStartTimer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tests:
name: HassStartTimer
slots:
hours: 2
response: Timer gestartet
response: Timer für 2 Stunden gestartet

- sentences:
- "Starte einen 1 Stunde Timer"
Expand All @@ -25,7 +25,7 @@ tests:
area: Wohnzimmer
slots:
hours: 1
response: Timer gestartet
response: Timer für 1 Stunde gestartet

- sentences:
- "Starte einen 1 Stunde und 15 Minuten Timer"
Expand All @@ -38,7 +38,7 @@ tests:
slots:
hours: 1
minutes: 15
response: Timer gestartet
response: Timer für 1 Stunde und 15 Minuten gestartet

- sentences:
- "Starte einen 1 Stunde und 30 Sekunden Timer"
Expand All @@ -51,7 +51,7 @@ tests:
slots:
hours: 1
seconds: 30
response: Timer gestartet
response: Timer für 1 Stunde und 30 Sekunden gestartet

- sentences:
- "Starte einen 1 Stunde 15 Minuten und 30 Sekunden timer"
Expand All @@ -65,7 +65,7 @@ tests:
hours: 1
minutes: 15
seconds: 30
response: Timer gestartet
response: Timer für 1 Stunde, 15 Minuten und 30 Sekunden gestartet

- sentences:
- "Starte einen 5 Minuten Timer"
Expand All @@ -77,7 +77,7 @@ tests:
area: Wohnzimmer
slots:
minutes: 5
response: Timer gestartet
response: Timer für 5 Minuten gestartet

- sentences:
- "Starte einen 5 Minuten Timer namens Pizza"
Expand All @@ -92,7 +92,7 @@ tests:
minutes: 5
name:
- "Pizza"
response: Timer gestartet
response: Timer namens Pizza für 5 Minuten gestartet

- sentences:
- "Starte einen 5 Minuten und 10 Sekunden Timer"
Expand All @@ -105,7 +105,7 @@ tests:
slots:
minutes: 5
seconds: 10
response: Timer gestartet
response: Timer für 5 Minuten und 10 Sekunden gestartet

- sentences:
- "Starte einen 45 Sekunden Timer"
Expand All @@ -117,7 +117,7 @@ tests:
area: Wohnzimmer
slots:
seconds: 45
response: Timer gestartet
response: Timer für 45 Sekunden gestartet

- sentences:
- "Öffne die Garagentür in 5 Minuten"
Expand All @@ -129,4 +129,4 @@ tests:
conversation_command:
- "Öffne die Garagentür"
- "öffne die Garagentür"
response: Anweisung erhalten
response: Anweisung wird in 5 Minuten ausgeführt