Skip to content

Commit

Permalink
HassMediaPrevious (#2337)
Browse files Browse the repository at this point in the history
  • Loading branch information
swonge authored Jul 18, 2024
1 parent 777c4f2 commit 29ce615
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
5 changes: 5 additions & 0 deletions responses/zh-hk/HassMediaPrevious.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: zh-hk
responses:
intents:
HassMediaPrevious:
default: "播放上一個單元"
2 changes: 2 additions & 0 deletions sentences/zh-hk/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ expansion_rules:
pause: "(暫停)"
unpause: "(取消暫停|恢復|繼續)"
next: "(跳|轉)[到](下一)(個|首)"
replay: "(再播放這)(個|首)"
previous: "(再播放上一)(個|首)"
item: "(台|曲|曲目|歌)"

# Timers
Expand Down
20 changes: 20 additions & 0 deletions sentences/zh-hk/media_player_HassMediaPrevious.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: zh-hk
intents:
HassMediaPrevious:
data:
- sentences:
- "<name> <replay> [<item>] "
- "<name> <previous> [<item>] "
requires_context:
domain: media_player

- sentences:
- "<replay> [<item>] "
- "<previous> [<item>] "
requires_context:
area:
slot: true

- sentences:
- "<area> <replay> [<item>]"
- "<area> <previous> [<item>]"
32 changes: 32 additions & 0 deletions tests/zh-hk/media_player_HassMediaPrevious.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: zh-hk
tests:
- sentences:
- "TV 再播放這首 歌 "
- "TV 再播放上一首 歌 "
intent:
name: HassMediaPrevious
slots:
name: "TV"
response: "播放上一個單元"

- sentences:
- "再播放這首 歌 "
- "再播放上一首 歌 "
intent:
name: HassMediaPrevious
slots:
area: "Living Room"
context:
area: Living Room
response: "播放上一個單元"

- sentences:
- "客廳 再播放這首 歌"
- "客廳 再播放上一首 歌"
intent:
name: HassMediaPrevious
slots:
area: "客廳"
context:
area: Living Room
response: "播放上一個單元"

0 comments on commit 29ce615

Please sign in to comment.