Skip to content

Commit

Permalink
Add support for Cover HassSetPosition in danish (#2895)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbhsn4 authored Jan 21, 2025
1 parent 480095f commit 4921116
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
5 changes: 5 additions & 0 deletions responses/da/HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: da
responses:
intents:
HassSetPosition:
default: "Position indstillet"
10 changes: 10 additions & 0 deletions sentences/da/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,16 @@ lists:
out: "on"
- in: "lukket"
out: "closed"

shopping_list_item:
wildcard: true

position:
range:
type: "percentage"
from: 0
to: 100

timer_seconds:
range:
from: 1
Expand Down Expand Up @@ -358,6 +365,9 @@ expansion_rules:
temperatur: "{temperature}[°| grader] [{temperature_unit}]"
tænd: "tænd [for]"
åbn: "(åben|åbn[e]) [for]"
sæt_numerisk_værdi: "(indstil|sæt|ændr|ændre|skru (op|ned)|forøg|formindsk)"
procent: "([ ]%| procent)"
position_pct: "{position}<procent>"
nogen: "(nogen|nogle)"
enhed: "enhed[(en|er|erne)]"
hvor_mange: "hvor[ ]mange"
Expand Down
18 changes: 18 additions & 0 deletions sentences/da/cover_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: da
intents:
HassSetPosition:
data:
# name
- sentences:
- "(<sæt_numerisk_værdi>|<åbn>|<luk>) {name} [position] [til] <position_pct>"
requires_context:
domain: cover
slots:
domain: cover

# device_class and area
- sentences:
- "(<sæt_numerisk_værdi>|<åbn>|<luk>) {cover_classes:device_class} ([til] <position_pct>;<i_på> {area})"
- "(<sæt_numerisk_værdi>|<åbn>|<luk>) {area} {cover_classes:device_class} [position] til <position_pct>"
slots:
domain: cover
26 changes: 26 additions & 0 deletions tests/da/cover_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: da
tests:
- sentences:
- "indstil badeværelsespersienne position til 50%"
- "sæt badeværelsespersienne til 50 procent"
- "åbn badeværelsespersienne 50 %"
intent:
name: HassSetPosition
slots:
domain: cover
name: "Badeværelsespersienne"
position: 50
response: "Position indstillet"

- sentences:
- "indstil gardin i stue til 50%"
- "åbn stue gardiner til 50 procent"
- "luk gardinerne 50% i stue"
intent:
name: HassSetPosition
slots:
domain: cover
device_class: "curtain"
area: "Stue"
position: 50
response: "Position indstillet"

0 comments on commit 4921116

Please sign in to comment.