Skip to content

Commit

Permalink
[SL] added weather_HassGetWeather (home-assistant#1688)
Browse files Browse the repository at this point in the history
* [SL] added weather_HassGetWeather, sentences, test, responses, common, fixtures

* [SL] added weather_HassGetWeather
  • Loading branch information
andrejs2 authored Nov 28, 2023
1 parent d843d8e commit 3d5d22e
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
24 changes: 24 additions & 0 deletions responses/sl/HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: sl
responses:
intents:
HassGetWeather:
default: >
{% set weather_condition = {
'jasno': 'in jasno',
'jasno': 'in jasno',
'oblačno': 'in oblačno',
'izjemno': 'in izjemno',
'megla': 'z meglo',
'toča': 's točo',
'strela': 'bliskovito',
'bliskovito deževno': 'bliskovito in deževno',
'delno oblačno': 'in delno oblačno',
'nalivi': 'in nalivi',
'deževno': 'in deževno',
'sneženje': 'in sneženje',
'snežno deževno': 's snegom in dežjem',
'sončno': 'in sončno',
'vetrovno': 'in vetrovno',
'vetrovna varianata': 'z vetrom in oblaki'
} %}
{{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.state | string).lower(), "") }}
1 change: 1 addition & 0 deletions sentences/sl/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ expansion_rules:
zapri: "zapri[te|mo]|spusti[te|mo]"
katera_je: "kater[i|a|o] je|povej [mi]|katerakoli|katero|kateri|katera"
kakšna_je: "kakšna je|povej [mi]"
kakšno_je: "kakšno je|povej [mi]"
koliko: "koliko"
vse: "[vsi|vsa|vse|vso]"
vsa: "[vsi|vsa|vse|vso]"
Expand Down
8 changes: 8 additions & 0 deletions sentences/sl/weather_HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: sl
intents:
HassGetWeather:
data:
- sentences:
- "<kakšno_je> vreme [[ v| na] <name>]"
requires_context:
domain: weather
14 changes: 14 additions & 0 deletions tests/sl/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,17 @@ entities:

- name: "sesaj|posesaj kuhinjo"
id: "script.vacuum_clean_kitchen"

- name: "v Mariboru"
id: "weather.maribor"
state: "deževno"
attributes:
temperature: "21"
temperature_unit: "stopinj"

- name: "v Benetkah"
id: "weather.benetke"
state: "jasno"
attributes:
temperature: "28"
temperature_unit: "stopinj"
18 changes: 18 additions & 0 deletions tests/sl/weather_HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: sl
tests:
- sentences:
- "kakšno je vreme v Mariboru?"

intent:
name: HassGetWeather
slots:
name: v Mariboru
response: 21 stopinj in deževno

- sentences:
- "kakšno je vreme v Benetkah"
intent:
name: HassGetWeather
slots:
name: v Benetkah
response: 28 stopinj in jasno

0 comments on commit 3d5d22e

Please sign in to comment.