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

[CS] Add HassSetPosition and sensorHassGetState #2022

Merged
merged 8 commits into from
Mar 2, 2024
Merged
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
9 changes: 9 additions & 0 deletions responses/cs/HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ responses:
HassGetState:
# the number of names returned is limited to 4, in case there are more, the first 3 names and the remaining count is returned
# with 4 names or less, the names are joined with a comma ", " and the last name is joined with " and "
default: "{{ state.state_with_unit }}" # used mostly for custom sentences

one: |
{{ slots.name | capitalize }} je {{ state.state_with_unit }}

Expand All @@ -29,6 +31,13 @@ responses:
Ne, {{ state.state_with_unit }}
{% endif %}

bs_yesno: |
{% if query.matched %}
Ano
{% else %}
Ne
{% endif %}

any: |
{% if query.matched %}
{% set match = query.matched | map(attribute="name") | sort | list %}
Expand Down
24 changes: 24 additions & 0 deletions responses/cs/HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: cs
responses:
intents:
HassGetWeather:
default: >
{% set weather_condition = {
'clear': 'a jasno',
'clear-night': 'a jasno',
'cloudy': 'a zamračeno',
'exceptional': 'a výjímečně',
'fog': 's mlhou',
'hail': 's kroupami',
'lightning': 's bouřkami',
'lightning-rainy': 's bouřkami a deštěm',
'partlycloudy': 'a částečně zamračeno',
'pouring': 'a silný déšť',
'rainy': 'a přeháňky',
'snowy': 'a sněžení',
'snowy-rainy': 'a déšť se sněhem',
'sunny': 'a slunečno',
'windy': 'a větrno',
'windy-variant': 'se silným větrem'
} %}
{{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.state | string).lower(), "") }}
5 changes: 5 additions & 0 deletions responses/cs/HassMediaNext.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: cs
responses:
intents:
HassMediaNext:
default: "Hraji další"
5 changes: 5 additions & 0 deletions responses/cs/HassMediaPause.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: cs
responses:
intents:
HassMediaPause:
default: "Zastaveno"
5 changes: 5 additions & 0 deletions responses/cs/HassMediaUnpause.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: cs
responses:
intents:
HassMediaUnpause:
default: "Pokračuji"
5 changes: 5 additions & 0 deletions responses/cs/HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: cs
responses:
intents:
HassSetPosition:
default: "Pozice nastavena"
5 changes: 5 additions & 0 deletions responses/cs/HassSetVolume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: cs
responses:
intents:
HassSetVolume:
default: "Hlasitost nastavena"
43 changes: 33 additions & 10 deletions sentences/cs/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ lists:

bs_door_states:
values:
- in: "otevřené"
- in: "otevřen(é|á|ý)"
out: "on"
- in: "zavřené"
- in: "zavřen(é|á|ý)"
out: "off"

bs_garage_door_states:
values:
- in: "otevřené"
- in: "otevřen(é|á|ý)"
out: "on"
- in: "zavřené"
- in: "zavřen(é|á|ý)"
out: "off"

bs_gas_states:
Expand Down Expand Up @@ -161,9 +161,9 @@ lists:

bs_moisture_states:
values:
- in: "vlhké"
- in: "vlhk(é|ý)"
out: "on"
- in: "suché"
- in: "such(é|ý)"
out: "off"

bs_motion_states:
Expand All @@ -175,16 +175,16 @@ lists:

bs_occupancy_states:
values:
- in: "přítomný"
- in: "přítomn(ý|ost)"
out: "on"
- in: "nepřítomný"
- in: "nepřítomn(ý|ost)"
out: "off"

bs_opening_states:
values:
- in: "otevřený"
- in: "otevřen(ý|ých|y|o|é)"
out: "on"
- in: "zavřený"
- in: "zavřen(ý|ých|y|o|é)"
out: "off"

bs_plug_states:
Expand Down Expand Up @@ -292,6 +292,16 @@ lists:
type: "temperature"
from: 0
to: 100
position:
range:
type: "percentage"
from: 0
to: 100
volume:
range:
type: "percentage"
from: 0
to: 100
temperature_unit:
values:
- "celsia"
Expand All @@ -317,14 +327,27 @@ expansion_rules:
ztlumit: "(ztlu(m|it)|snížit|sniž)"
zvysit: "zv(yš|ýšit)"
teplota: "{temperature}[°| stupňů] [{temperature_unit}]"
pozice: "{position}[[ ]%| procent]"
volume: "{volume:volume_level}[[ ]%| procent]"

brightness: "[na] {brightness}[%| procent]"
zavrit: "(zavři|zavřít)"
otevrit: "(otevři|otevřít)"
roztahnout: "(roz|vy|od)táhn(out|i)"
zatahnout: "zatáhn(out|i)"
ktere: "(kter(á|é)|jak(é|á))"
prejit: "(přejít|přejdi)"
je_jsou: "(je|jsou)"
v: "(v|ve|na)"
y_ej: "(ý|ej)"
y_e: "(ý|é)"
koncentrace: "(úroveň|množství|koncentrace)"
jaky_je: "(jak<y_e> (je|bude)|jaká (je|bude)|jakou|jaká|jak|kolik|kolik (je|bude))"
jaka_je_class_of_name: >
(
<jaky_je> <class> [(je|byla)] [[(na|z)]měřen(á|ý|é)] [(na|na sen(z|s)oru|sen(z|s)orem)] {name} [<area>]
|<jaky_je> <area> <class> (na|z)měřen(á|ý) [(na sen(z|s)oru|sen(z|s)orem)] {name}
)

skip_words:
- "prosím"
Loading