Skip to content

Commit

Permalink
[SK] Add setPosition intents (#2029)
Browse files Browse the repository at this point in the history
* [SK] Add vacuum intents

* [SK] Add vacuum intents - fix lng

* [SK] Add setPosition intents
  • Loading branch information
LubosKadasi committed Mar 3, 2024
1 parent cc48edb commit 1fcab2f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions responses/sk/HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: sk
responses:
intents:
HassSetPosition:
default: "Poloha nastavená"
6 changes: 6 additions & 0 deletions sentences/sk/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ lists:
type: "percentage"
from: 0
to: 100
position:
range:
type: "percentage"
from: 0
to: 100
on_off_states:
values:
- in: "(zapnut(ý|á|é|ých)|zasvieten(ý|á|é|ých)|otvoren(ý|á|é|ých))"
Expand Down Expand Up @@ -82,5 +87,6 @@ expansion_rules:
set: "(nastav|prestav|zmeň)"
open: "(otvor|odostri|(roz|vy)tiahni)"
close: "(zatvor|zavri|zastri|(s|za)tiahni)"
position: "{position}[[ ]%| percent]"
skip_words:
- "prosím"
10 changes: 10 additions & 0 deletions sentences/sk/homeassistant_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: sk
intents:
HassSetPosition:
data:
- sentences:
- "<set> [polohu|pozíciu] <name> na <position>"
requires_context:
domain:
- cover
- valve
14 changes: 14 additions & 0 deletions tests/sk/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,17 @@ entities:
- name: "Vysávač"
id: "vacuum.rover"
state: "idle"

- name: "Spálňov(á|ú|é) rolet(a|u|y)"
id: "cover.bedroom"
area: "bedroom"
state: "closed"
attributes:
device_class: curtain
position: "0"

- name: "Hlavný ventil"
id: "valve.main_valve"
state: "open"
attributes:
position: "100"
18 changes: 18 additions & 0 deletions tests/sk/homeassistant_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: sk
tests:
- sentences:
- "nastav spálňovú roletu na 50%"
intent:
name: HassSetPosition
slots:
name: "Spálňovú roletu"
position: 50
response: "Poloha nastavená"
- sentences:
- "nastav hlavný ventil na 100"
intent:
name: HassSetPosition
slots:
name: "Hlavný ventil"
position: 100
response: "Poloha nastavená"

0 comments on commit 1fcab2f

Please sign in to comment.