Skip to content

Commit 27f0d5a

Browse files
authored
[EN] Allow - in timer durations (#3549)
* Allow - in timer durations * Adjust versions
1 parent ceec1d7 commit 27f0d5a

10 files changed

+16
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v5
2626
- uses: actions/setup-python@v6
2727
with:
28-
python-version: "3.12"
28+
python-version: "3.13"
2929
cache: "pip"
3030
- run: script/setup
3131
- run: python3 -m script.intentfest add_language test_add_language_generates_valid_data "CI Added Language"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
hassil==3.3.0
1+
hassil==3.4.0
22
PyYAML==6.0.3
33
voluptuous==0.15.2
44
regex==2025.10.23

sentences/en/_common.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,14 @@ expansion_rules:
444444
# Timers
445445
timer_set: "(start|set|create)"
446446
timer_cancel: "(cancel|stop)"
447-
timer_duration_seconds: "{timer_seconds:seconds} second[s]"
448-
timer_duration_minutes: "({timer_minutes:minutes} minute[s] [[and] {timer_seconds:seconds} second[s]])|({timer_minutes:minutes} and [a] {timer_half:seconds} minute[s])|({timer_half:seconds} a minute[s])"
449-
timer_duration_hours: "({timer_hours:hours} hour[s] [[and] {timer_minutes:minutes} minute[s]] [[and] {timer_seconds:seconds} second[s]])|({timer_hours:hours} and [a] {timer_half:minutes} hour[s])|({timer_half:minutes} an hour[s])"
447+
timer_duration_seconds: "{timer_seconds:seconds}( |-)second[s]"
448+
timer_duration_minutes: "({timer_minutes:minutes}( |-)minute[s] [[and] {timer_seconds:seconds}( |-)second[s]])|({timer_minutes:minutes} and [a] {timer_half:seconds} minute[s])|({timer_half:seconds} a minute[s])"
449+
timer_duration_hours: "({timer_hours:hours}( |-)hour[s] [[and] {timer_minutes:minutes}( |-)minute[s]] [[and] {timer_seconds:seconds}( |-)second[s]])|({timer_hours:hours} and [a] {timer_half:minutes} hour[s])|({timer_half:minutes} an hour[s])"
450450
timer_duration: "<timer_duration_seconds>|<timer_duration_minutes>|<timer_duration_hours>"
451451

452-
timer_start_seconds: "{timer_seconds:start_seconds} second[s]"
453-
timer_start_minutes: "{timer_minutes:start_minutes} minute[s] [[and] {timer_seconds:start_seconds} second[s]]"
454-
timer_start_hours: "{timer_hours:start_hours} hour[s] [[and] {timer_minutes:start_minutes} minute[s]] [[and] {timer_seconds:start_seconds} second[s]]"
452+
timer_start_seconds: "{timer_seconds:start_seconds}( |-)second[s]"
453+
timer_start_minutes: "{timer_minutes:start_minutes}( |-)minute[s] [[and] {timer_seconds:start_seconds}( |-)second[s]]"
454+
timer_start_hours: "{timer_hours:start_hours}( |-)hour[s] [[and] {timer_minutes:start_minutes}( |-)minute[s]] [[and] {timer_seconds:start_seconds}( |-)second[s]]"
455455
timer_start: "<timer_start_seconds>|<timer_start_minutes>|<timer_start_hours>"
456456

457457
# Fans

tests/en/homeassistant_HassCancelTimer.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tests:
1111

1212
- sentences:
1313
- "cancel 5 minute timer"
14+
- "cancel 5-minute timer"
1415
- "stop timer for 5 minutes"
1516
- "stop 5 minute timer"
1617
intent:

tests/en/homeassistant_HassDecreaseTimer.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ tests:
1414

1515
- sentences:
1616
- "remove 5 minutes from 1 hour timer"
17+
- "remove 5 minutes from 1-hour timer"
1718
- "remove 5 minutes from timer for 1 hour"
1819
- "take 5 minutes off 1 hour timer"
1920
- "take 5 minutes from 1 hour timer"

tests/en/homeassistant_HassIncreaseTimer.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ tests:
1212

1313
- sentences:
1414
- "add 5 minutes to 1 hour timer"
15+
- "add 5 minutes to 1-hour timer"
1516
- "add 5 minutes to timer for 1 hour"
1617
- "increase 1 hour timer by 5 minutes"
1718
- "increase timer for 1 hour by 5 minutes"

tests/en/homeassistant_HassPauseTimer.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tests:
1010

1111
- sentences:
1212
- "pause 1 hour timer"
13+
- "pause 1-hour timer"
1314
- "pause timer for 1 hour"
1415
intent:
1516
name: HassPauseTimer

tests/en/homeassistant_HassStartTimer.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: en
33
tests:
44
- sentences:
55
- "10 minute timer"
6+
- "10-minute timer"
67
intent:
78
name: HassStartTimer
89
slots:
@@ -11,6 +12,7 @@ tests:
1112

1213
- sentences:
1314
- "start a 1 hour timer"
15+
- "start a 1-hour timer"
1416
- "set timer for 1 hour"
1517
- "create 1 hour timer"
1618
- "1 hour timer"

tests/en/homeassistant_HassTimerStatus.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ tests:
1313
1414
- sentences:
1515
- "status of 1 hour timer"
16+
- "status of 1-hour timer"
1617
- "1 hour timer status"
1718
- "time left on the 1 hour timer"
1819
- "how long is left on my 1 hour timer"

tests/en/homeassistant_HassUnpauseTimer.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tests:
1010

1111
- sentences:
1212
- "resume 1 hour timer"
13+
- "resume 1-hour timer"
1314
- "continue timer for 1 hour"
1415
intent:
1516
name: HassUnpauseTimer

0 commit comments

Comments
 (0)