Skip to content

Commit

Permalink
add HasGetWeather and tests [BG] (#2102)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddppddpp committed Mar 22, 2024
1 parent fe7e207 commit 06766b7
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 0 deletions.
24 changes: 24 additions & 0 deletions responses/bg/HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: bg
responses:
intents:
HassGetWeather:
default: >
{% set weather_condition = {
'clear': 'и ясно',
'clear-night': 'и ясно',
'cloudy': 'и облачно',
'exceptional': 'and exceptional',
'fog': 'с мъгла',
'hail': 'с градушка',
'lightning': 'с грамотевици',
'lightning-rainy': 'с грамотевици и дъжд',
'partlycloudy': 'и с частична облачност',
'pouring': 'и обилни дъждове',
'rainy': 'и дъждовно',
'snowy': 'и снеговалеж',
'snowy-rainy': 'със сняг и дъжд',
'sunny': 'и слънчево',
'windy': 'и ветровито',
'windy-variant': 'with wind and clouds'
} %}
{{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.state | string).lower(), "") }}
12 changes: 12 additions & 0 deletions sentences/bg/weather_HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: bg
intents:
HassGetWeather:
data:
- sentences:
- "<what_is>[ е] времето"
- "как[ е] времето"
- sentences:
- "<what_is>[ е] времето (за|в) <name>"
- "как[ е] времето (за|в) <name>"
requires_context:
domain: weather
14 changes: 14 additions & 0 deletions tests/bg/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,17 @@ entities:
out: "on"
attributes:
device_class: window

- name: "Лондон"
id: "weather.london"
state: "rainy"
attributes:
temperature: "8"
temperature_unit: "°C"

- name: "Лос Анджелис"
id: "weather.los_angeles"
state: "clear"
attributes:
temperature: "24"
temperature_unit: "°C"
25 changes: 25 additions & 0 deletions tests/bg/weather_HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: bg
tests:
- sentences:
- "Какво е времето?"
- "Как е времето?"
intent:
name: HassGetWeather
response: 8 °C и дъждовно

- sentences:
- "какво е времето в Лондон?"
- "как е времето в Лондон?"
intent:
name: HassGetWeather
slots:
name: Лондон
response: 8 °C и дъждовно

- sentences:
- "Какво е времето в Лос Анджелис?"
intent:
name: HassGetWeather
slots:
name: Лос Анджелис
response: 24 °C и ясно

0 comments on commit 06766b7

Please sign in to comment.