diff --git a/responses/sl/HassGetWeather.yaml b/responses/sl/HassGetWeather.yaml new file mode 100644 index 0000000000..c2730a493c --- /dev/null +++ b/responses/sl/HassGetWeather.yaml @@ -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(), "") }} diff --git a/sentences/sl/_common.yaml b/sentences/sl/_common.yaml index 4b91087809..09bb68e592 100644 --- a/sentences/sl/_common.yaml +++ b/sentences/sl/_common.yaml @@ -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]" diff --git a/sentences/sl/weather_HassGetWeather.yaml b/sentences/sl/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..a928aaf38d --- /dev/null +++ b/sentences/sl/weather_HassGetWeather.yaml @@ -0,0 +1,8 @@ +language: sl +intents: + HassGetWeather: + data: + - sentences: + - " vreme [[ v| na] ]" + requires_context: + domain: weather diff --git a/tests/sl/_fixtures.yaml b/tests/sl/_fixtures.yaml index 5de878a2cb..7644b07bbc 100644 --- a/tests/sl/_fixtures.yaml +++ b/tests/sl/_fixtures.yaml @@ -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" diff --git a/tests/sl/weather_HassGetWeather.yaml b/tests/sl/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..fd363832bb --- /dev/null +++ b/tests/sl/weather_HassGetWeather.yaml @@ -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