diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000000..893da6f041 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,19 @@ +categories: + - title: "Breaking Changes" + labels: + - "breaking change" + - title: "Intent Updates" + labels: + - "intent" + - title: "Sentence Updates" + collapse-after: 1 + labels: + - "sentence" + - title: "Dependencies" + collapse-after: 1 + labels: + - "dependencies" +template: | + ## What's Changed + + $CHANGES diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 6c87745759..e2e09050de 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -59,4 +59,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2.0.4 + uses: actions/deploy-pages@v2.0.5 diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000000..896edaf4a3 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,14 @@ +name: Release Drafter + +on: + push: + branches: + - main + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/intents.yaml b/intents.yaml index 3cd72944d8..3bdc820e09 100644 --- a/intents.yaml +++ b/intents.yaml @@ -133,7 +133,7 @@ HassClimateSetTemperature: required: false HassClimateGetTemperature: - supported: false + supported: true domain: climate description: "Gets the current temperature of a climate device or entity" slots: @@ -165,7 +165,7 @@ HassShoppingListAddItem: # ----------------------------------------------------------------------------- HassGetWeather: - supported: false + supported: true domain: weather description: "Gets the current weather" slots: @@ -178,7 +178,7 @@ HassGetWeather: # ----------------------------------------------------------------------------- HassListAddItem: - supported: false + supported: true domain: todo description: "Adds an item to a todo list" slots: diff --git a/package/home_assistant_intents/domains.py b/package/home_assistant_intents/domains.py index 8364c28bde..7ecce50da2 100644 --- a/package/home_assistant_intents/domains.py +++ b/package/home_assistant_intents/domains.py @@ -1,5 +1,63 @@ DOMAINS_AND_LANGUAGES = { + "climate": [ + "af", + "ar", + "bg", + "bn", + "ca", + "cs", + "da", + "de", + "de-CH", + "el", + "en", + "es", + "eu", + "fa", + "fi", + "fr", + "fr-CA", + "gl", + "gu", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "ka", + "kn", + "ko", + "lb", + "lt", + "lv", + "ml", + "mn", + "ms", + "nb", + "nl", + "pl", + "pt", + "pt-br", + "ro", + "ru", + "sk", + "sl", + "sr", + "sv", + "sw", + "te", + "tr", + "uk", + "ur", + "vi", + "zh-cn", + "zh-hk", + "zh-tw", + ], "homeassistant": [ + "af", "ar", "bg", "bn", @@ -11,6 +69,8 @@ "el", "en", "es", + "et", + "eu", "fa", "fi", "fr", @@ -26,6 +86,7 @@ "it", "ka", "kn", + "ko", "lb", "lt", "lv", @@ -54,6 +115,7 @@ "zh-tw", ], "light": [ + "af", "ar", "bg", "bn", @@ -65,6 +127,7 @@ "el", "en", "es", + "eu", "fa", "fi", "fr", @@ -80,6 +143,7 @@ "it", "ka", "kn", + "ko", "lb", "lt", "lv", @@ -107,4 +171,28 @@ "zh-hk", "zh-tw", ], + "shopping_list": [ + "ca", + "cs", + "de", + "de-CH", + "el", + "en", + "es", + "fr", + "hr", + "ko", + "nb", + "nl", + "pl", + "pt", + "ro", + "ru", + "sk", + "sr", + "sv", + "uk", + ], + "todo": ["de", "en", "es", "fr", "nl", "ro"], + "weather": ["de", "en", "es", "fr", "nl", "ro"], } diff --git a/requirements.txt b/requirements.txt index 6607dfed26..f0836859f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -hassil==1.5.0 +hassil==1.5.1 PyYAML==6.0.1 voluptuous==0.13.1 regex==2023.10.3 @@ -7,6 +7,6 @@ jinja2==3.1.2 black==23.11.0 flake8==6.1.0 isort==5.12.0 -mypy==1.7.0 +mypy==1.7.1 pylint==3.0.2 pytest==7.4.3 diff --git a/responses/af/HassClimateGetTemperature.yaml b/responses/af/HassClimateGetTemperature.yaml index 4368103d2d..8bc2af442f 100644 --- a/responses/af/HassClimateGetTemperature.yaml +++ b/responses/af/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: af responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/ar/HassClimateGetTemperature.yaml b/responses/ar/HassClimateGetTemperature.yaml index 6bd66b03d9..5a0cc11d89 100644 --- a/responses/ar/HassClimateGetTemperature.yaml +++ b/responses/ar/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: ar responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/cs/HassClimateGetTemperature.yaml b/responses/cs/HassClimateGetTemperature.yaml index 7c8d574d34..d31326af0b 100644 --- a/responses/cs/HassClimateGetTemperature.yaml +++ b/responses/cs/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: cs responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/cs/HassGetState.yaml b/responses/cs/HassGetState.yaml index 8f3ad7d044..a83289160a 100644 --- a/responses/cs/HassGetState.yaml +++ b/responses/cs/HassGetState.yaml @@ -10,6 +10,9 @@ responses: one_light: | Světlo {{ slots.name | capitalize }} je {{ state.state_with_unit }} + one_scene: | + Scéna {{ slots.name | capitalize }} je {{ state.state_with_unit }} + one_cover: | {% set present_continuous = ('je', 'jí', 'rá') %} {% set present_simple = ('no', 'ná', 'né') %} diff --git a/responses/cs/HassListAddItem.yaml b/responses/cs/HassListAddItem.yaml new file mode 100644 index 0000000000..d42849efde --- /dev/null +++ b/responses/cs/HassListAddItem.yaml @@ -0,0 +1,5 @@ +language: "cs" +responses: + intents: + HassListAddItem: + item_added: "Přidáno: {{ slots.item }}" diff --git a/responses/cs/HassTurnOn.yaml b/responses/cs/HassTurnOn.yaml index beec020c46..aef828f420 100644 --- a/responses/cs/HassTurnOn.yaml +++ b/responses/cs/HassTurnOn.yaml @@ -9,3 +9,4 @@ responses: light: "Rozsvíceno" cover: "Otevřeno" garage: "Vrata otevřena" + scene: "Scéna aktivována" diff --git a/responses/de/HassClimateGetTemperature.yaml b/responses/de/HassClimateGetTemperature.yaml index ea3622d366..ff1eddee17 100644 --- a/responses/de/HassClimateGetTemperature.yaml +++ b/responses/de/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: de responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/de/HassGetWeather.yaml b/responses/de/HassGetWeather.yaml new file mode 100644 index 0000000000..ff1c23070a --- /dev/null +++ b/responses/de/HassGetWeather.yaml @@ -0,0 +1,24 @@ +language: de +responses: + intents: + HassGetWeather: + default: > + {% set weather_condition = { + 'clear': 'und klar', + 'clear-night': 'und klare Nacht', + 'cloudy': 'und bewölkt', + 'exceptional': 'und außergewöhnlich', + 'fog': 'mit Nebel', + 'hail': 'mit Hagel', + 'lightning': 'mit Gewitter', + 'lightning-rainy': 'mit Gewitter und Regen', + 'partlycloudy': 'und teilweise bewölkt', + 'pouring': 'und strömender Regen', + 'rainy': 'und regnerisch', + 'snowy': 'und verschneit', + 'snowy-rainy': 'mit Schnee und Regen', + 'sunny': 'und sonnig', + 'windy': 'und windig', + 'windy-variant': 'mit Wind und Wolken' + } %} + {{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.state | string).lower(), "") }} diff --git a/responses/de/HassListAddItem.yaml b/responses/de/HassListAddItem.yaml new file mode 100644 index 0000000000..fa2153d0a1 --- /dev/null +++ b/responses/de/HassListAddItem.yaml @@ -0,0 +1,5 @@ +language: de +responses: + intents: + HassListAddItem: + item_added: "{{ slots.item }} hinzugefügt" diff --git a/responses/el/HassTurnOff.yaml b/responses/el/HassTurnOff.yaml index 11faac29fb..cc9097b584 100644 --- a/responses/el/HassTurnOff.yaml +++ b/responses/el/HassTurnOff.yaml @@ -2,7 +2,7 @@ language: el responses: intents: HassTurnOff: - default: "Έκλεισαν τα φώτα στο {{ slots.name }}" + default: "Έκλεισε" lights_area: "Έκλεισαν τα φώτα" fans_area: "Έκλεισαν οι ανεμιστήρες" cover: "{{ slots.name }} έκλεισε" diff --git a/responses/el/HassTurnOn.yaml b/responses/el/HassTurnOn.yaml index 1f60866d28..79b3ba8da2 100644 --- a/responses/el/HassTurnOn.yaml +++ b/responses/el/HassTurnOn.yaml @@ -2,7 +2,7 @@ language: el responses: intents: HassTurnOn: - default: "Άνοιξαν τα φώτα στο {{ slots.name }}" + default: "Άνοιξε" lights_area: "Άνοιξαν τα φώτα" fans_area: "Άνοιξαν οι ανεμιστήρες" cover: "{{ slots.name }} άνοιξε" diff --git a/responses/en/HassClimateGetTemperature.yaml b/responses/en/HassClimateGetTemperature.yaml index 4c6ea780d4..0d937283b6 100644 --- a/responses/en/HassClimateGetTemperature.yaml +++ b/responses/en/HassClimateGetTemperature.yaml @@ -2,4 +2,10 @@ language: en responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: > + {% set temperature = state_attr(state.entity_id, 'current_temperature') %} + {% if temperature == 1: %} + {{ temperature }} degree + {% else: %} + {{ temperature }} degrees + {% endif %} diff --git a/responses/es/HassClimateGetTemperature.yaml b/responses/es/HassClimateGetTemperature.yaml index 0ae5ab143f..53d2a83dce 100644 --- a/responses/es/HassClimateGetTemperature.yaml +++ b/responses/es/HassClimateGetTemperature.yaml @@ -2,4 +2,6 @@ language: es responses: intents: HassClimateGetTemperature: - default: "{{ state.state | float | abs | round(2) }} {{ 'grado' if state.state | float | abs == 1 else 'grados' }} {{ 'bajo cero' if state.state | float < 0 else '' }}" + default: > + {% set temperature = state_attr(state.entity_id, 'current_temperature') %} + {{ temperature | float | abs | round(1) }} {{ 'grado' if temperature | float | abs == 1 else 'grados' }} {{ 'bajo cero' if temperature | float < 0 else '' }} diff --git a/responses/et/HassTurnOff.yaml b/responses/et/HassTurnOff.yaml index fdfaac6338..4aebb9b175 100644 --- a/responses/et/HassTurnOff.yaml +++ b/responses/et/HassTurnOff.yaml @@ -2,4 +2,4 @@ language: et responses: intents: HassTurnOff: - default: "Turned off {{ slots.name }}" + default: "{{ slots.name }} lülitatud välja" diff --git a/responses/et/HassTurnOn.yaml b/responses/et/HassTurnOn.yaml index 40be79e544..f0e789d8f2 100644 --- a/responses/et/HassTurnOn.yaml +++ b/responses/et/HassTurnOn.yaml @@ -2,4 +2,4 @@ language: et responses: intents: HassTurnOn: - default: "Turned on {{ slots.name }}" + default: "{{ slots.name }} lülitatud sisse" diff --git a/responses/eu/HassClimateGetTemperature.yaml b/responses/eu/HassClimateGetTemperature.yaml index ce3269392a..0521dfa7a1 100644 --- a/responses/eu/HassClimateGetTemperature.yaml +++ b/responses/eu/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: eu responses: intents: HassClimateGetTemperature: - default: "TODO: {{ state.state_with_unit }}" + default: "TODO: {{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/fi/HassClimateGetTemperature.yaml b/responses/fi/HassClimateGetTemperature.yaml index e0d795a2fd..c8249f2758 100644 --- a/responses/fi/HassClimateGetTemperature.yaml +++ b/responses/fi/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: fi responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/fr/HassClimateGetTemperature.yaml b/responses/fr/HassClimateGetTemperature.yaml index 66b7b9adda..19d5cfbca8 100644 --- a/responses/fr/HassClimateGetTemperature.yaml +++ b/responses/fr/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: fr responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/fr/HassGetState.yaml b/responses/fr/HassGetState.yaml index 6191080bac..d1db65428c 100644 --- a/responses/fr/HassGetState.yaml +++ b/responses/fr/HassGetState.yaml @@ -4,6 +4,9 @@ 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 }} + one: | {{ slots.name | capitalize }} est {{ state.state_with_unit }} @@ -39,6 +42,29 @@ responses: Non {% endif %} + any_short: | + {% if query.matched %} + {% set match = query.matched | map(attribute="name") | sort | list %} + {% set count_match = no_match | length | int %} + {% if match | length > 4 %} + Oui, {{ match[:3] | join(", ") }} et {{ (match | length - 3) }} autres + {% elif match | length == 1 %} + Oui, + {% for name in match -%} + {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} + {{ name }} + {% endfor %} + {%- else -%} + Oui, + {% for name in match -%} + {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} + {{ name }} + {% endfor %} + {% endif %} + {% else %} + Non + {% endif %} + all: | {% if not query.unmatched: %} Oui @@ -85,5 +111,33 @@ responses: {% endif %} {% endif %} + which_person: | + {% if not query.matched %} + Personne + {% else: %} + {% set match = query.matched | map(attribute="name") | sort | list %} + {% set count_match = match | length | int %} + {% if match | count > 4 %} + {{ match[:3] | join(", ") }} et {{ (match | length - 3) }} autres + {% elif match | count == 1 %} + {% for name in match %} + {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} + {{ name }} + {% endfor %} + {% else %} + {% for name in match %} + {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} + {{ name }} + {% endfor %} + {% endif %} + {% endif %} + how_many: | {{ query.matched | length }} + + where: | + {% if state == "not_home" %} + {{ slots.name | capitalize }} est absent(e) + {% else %} + {{ slots.name | capitalize }} est dans la zone {{ state.state }} + {% endif %} diff --git a/responses/fr/HassGetWeather.yaml b/responses/fr/HassGetWeather.yaml new file mode 100644 index 0000000000..e21ecbda79 --- /dev/null +++ b/responses/fr/HassGetWeather.yaml @@ -0,0 +1,24 @@ +language: fr +responses: + intents: + HassGetWeather: + default: > + {% set weather_condition = { + 'clear': 'et le temps est clair', + 'clear-night': 'et la nuit est claire', + 'cloudy': 'et le temps est nuageux', + 'exceptional': 'et les conditions météos sont exceptionnelles', + 'fog': 'avec du brouillard', + 'hail': 'avec de la grêle', + 'lightning': 'avec de l\'orage', + 'lightning-rainy': 'avec de l\'orage et de la pluie', + 'partlycloudy': 'et un temps partiellement nuageux', + 'pouring': 'et une pluie battante', + 'rainy': 'et de la pluie', + 'snowy': 'et de la neige', + 'snowy-rainy': 'avec pluie et neige mêlées', + 'sunny': 'et un temps ensoleillé', + 'windy': 'avec un temps venteux', + 'windy-variant': 'et un temps variable et venteux' + } %} + {{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.state | string).lower(), "") }} diff --git a/responses/fr/HassListAddItem.yaml b/responses/fr/HassListAddItem.yaml new file mode 100644 index 0000000000..9197385cd6 --- /dev/null +++ b/responses/fr/HassListAddItem.yaml @@ -0,0 +1,5 @@ +language: "fr" +responses: + intents: + HassListAddItem: + item_added: "{{ slots.item }} ajouté" diff --git a/responses/hr/HassClimateGetTemperature.yaml b/responses/hr/HassClimateGetTemperature.yaml index fe94e48367..4c79bb4042 100644 --- a/responses/hr/HassClimateGetTemperature.yaml +++ b/responses/hr/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: hr responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/is/HassClimateGetTemperature.yaml b/responses/is/HassClimateGetTemperature.yaml index c7ad49fd74..fadb38fd56 100644 --- a/responses/is/HassClimateGetTemperature.yaml +++ b/responses/is/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: is responses: intents: HassClimateGetTemperature: - default: "Hitinn er {{ state.state_with_unit }}" + default: "Hitinn er {{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/ko/HassClimateGetTemperature.yaml b/responses/ko/HassClimateGetTemperature.yaml index 5880bc5143..9f86397b70 100644 --- a/responses/ko/HassClimateGetTemperature.yaml +++ b/responses/ko/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: ko responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}입니다" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}입니다" diff --git a/responses/lt/HassClimateGetTemperature.yaml b/responses/lt/HassClimateGetTemperature.yaml index ba4b44a8b7..3ba4aa7eb4 100644 --- a/responses/lt/HassClimateGetTemperature.yaml +++ b/responses/lt/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: lt responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/nb/HassClimateGetTemperature.yaml b/responses/nb/HassClimateGetTemperature.yaml index ea7119a371..643fe7aac5 100644 --- a/responses/nb/HassClimateGetTemperature.yaml +++ b/responses/nb/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: nb responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/nl/HassGetState.yaml b/responses/nl/HassGetState.yaml index 076ad9f8af..120a92841e 100644 --- a/responses/nl/HassGetState.yaml +++ b/responses/nl/HassGetState.yaml @@ -14,6 +14,15 @@ responses: Nee, die is {{ state.state_with_unit }} {% endif %} + one_zone: | + {% if query.matched %} + Ja + {% elif state.state == 'not_home' %} + Nee, die is niet thuis + {% else %} + Nee, die is in de zone {{ state.state_with_unit }} + {% endif %} + bs_yesno: | {% if query.matched %} Ja @@ -70,3 +79,12 @@ responses: how_many: | {{ query.matched | length }} + + where: | + {% if state.state == "not_home" %} + {{ slots.name | capitalize }} is niet thuis + {% elif state.state == "home" %} + {{ slots.name | capitalize }} is thuis + {% else %} + {{ slots.name | capitalize }} is in zone {{ state.state }} + {% endif %} diff --git a/responses/nl/HassGetWeather.yaml b/responses/nl/HassGetWeather.yaml new file mode 100644 index 0000000000..6bcf41c742 --- /dev/null +++ b/responses/nl/HassGetWeather.yaml @@ -0,0 +1,24 @@ +language: nl +responses: + intents: + HassGetWeather: + default: > + {% set weather_condition = { + 'clear': 'en helder', + 'clear-night': 'en helder', + 'cloudy': 'en bewolkt', + 'exceptional': 'en extreem', + 'fog': 'met mist', + 'hail': 'met hagel', + 'lightning': 'met onweer', + 'lightning-rainy': 'met onweer en regen', + 'partlycloudy': 'en gedeeltelijk bewolkt', + 'pouring': 'met stortregen', + 'rainy': 'met regen', + 'snowy': 'met sneeuw', + 'snowy-rainy': 'met sneeuw en regen', + 'sunny': 'en zonnig', + 'windy': 'met wind', + 'windy-variant': 'met wind en bewolking' + } %} + {{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.state | string).lower(), "") }} diff --git a/responses/nl/HassListAddItem.yaml b/responses/nl/HassListAddItem.yaml new file mode 100644 index 0000000000..15c9274ec0 --- /dev/null +++ b/responses/nl/HassListAddItem.yaml @@ -0,0 +1,5 @@ +language: "nl" +responses: + intents: + HassListAddItem: + item_added: "{{ slots.item }} toegevoegd" diff --git a/responses/nl/HassShoppingListAddItem.yaml b/responses/nl/HassShoppingListAddItem.yaml index 6381c12836..49ce04e565 100644 --- a/responses/nl/HassShoppingListAddItem.yaml +++ b/responses/nl/HassShoppingListAddItem.yaml @@ -2,4 +2,4 @@ language: "nl" responses: intents: HassShoppingListAddItem: - item_added: "{{ slots.item | title}} toegevoegd" + item_added: "{{ slots.item }} toegevoegd" diff --git a/responses/pt/HassClimateGetTemperature.yaml b/responses/pt/HassClimateGetTemperature.yaml index 8ef2601621..2ca6f2f95e 100644 --- a/responses/pt/HassClimateGetTemperature.yaml +++ b/responses/pt/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: pt responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/ro/HassClimateGetTemperature.yaml b/responses/ro/HassClimateGetTemperature.yaml index c62a0cbf52..b25b2a45c0 100644 --- a/responses/ro/HassClimateGetTemperature.yaml +++ b/responses/ro/HassClimateGetTemperature.yaml @@ -2,4 +2,12 @@ language: ro responses: intents: HassClimateGetTemperature: - default: "{{ state.state }} {{ 'grad' if state.state | float | abs == 1 else 'grade' if state.state == 0 or state.state | float % 1 != 0 or state.state | float % 100 | abs < 20 else 'de grade' }}" + default: | + {% set temperature = state_attr(state.entity_id, 'current_temperature') %} + {% if temperature | float | abs == 1 %} + {{ temperature }} grad + {% elif temperature == 0 or temperature | float % 1 != 0 or temperature | float % 100 | abs < 20 %} + {{ temperature }} grade + {% else %} + {{ temperature }} de grade + {% endif %} diff --git a/responses/sl/HassClimateGetTemperature.yaml b/responses/sl/HassClimateGetTemperature.yaml index 0611130b0e..db033a6c7f 100644 --- a/responses/sl/HassClimateGetTemperature.yaml +++ b/responses/sl/HassClimateGetTemperature.yaml @@ -2,4 +2,22 @@ language: sl responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: | + {% set temperature = state_attr(state.entity_id, 'current_temperature') %} + {% set temperature_abs = temperature | float | abs %} + + {% if temperature_abs == 1 %} + {{ temperature }} stopinja + {% elif temperature == 0 or temperature | float % 1 != 0 or temperature | float % 100 | abs < 20 %} + {{ temperature }} stopinje + {% else %} + {{ temperature }} stopinj + {% if temperature | float % 1 != 0 %} + {% set decimal_part = temperature | string | regex_replace('\\d+\\.', '') %} + {% if decimal_part != '1' %} + cela {{ decimal_part }} stopinje + {% else %} + cela {{ decimal_part }} stopinja + {% endif %} + {% endif %} + {% endif %} diff --git a/responses/sl/HassGetState.yaml b/responses/sl/HassGetState.yaml index 56bf803cf6..fb7aa73982 100644 --- a/responses/sl/HassGetState.yaml +++ b/responses/sl/HassGetState.yaml @@ -67,6 +67,13 @@ responses: how_many: | {{ query.matched | length }} + where: | + {% if state == "not_home" %} + {{ slots.name | capitalize }} ni doma + {% else %} + {{ slots.name | capitalize }} je {{ state.state }} + {% endif %} + sensor_value: | Vrednost senzorja je {{ state.state_with_unit }} 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/responses/sl/HassListAddItem.yaml b/responses/sl/HassListAddItem.yaml new file mode 100644 index 0000000000..2dc9974d87 --- /dev/null +++ b/responses/sl/HassListAddItem.yaml @@ -0,0 +1,5 @@ +language: sl +responses: + intents: + HassListAddItem: + item_added: "Dodano {{ slots.item }}" diff --git a/responses/sl/HassShoppingListAddItem.yaml b/responses/sl/HassShoppingListAddItem.yaml new file mode 100644 index 0000000000..6bc75b66f4 --- /dev/null +++ b/responses/sl/HassShoppingListAddItem.yaml @@ -0,0 +1,5 @@ +language: sl +responses: + intents: + HassShoppingListAddItem: + item_added: "Artikel je dodan na nakupovalni seznam" diff --git a/responses/sl/HassTurnOff.yaml b/responses/sl/HassTurnOff.yaml index c6b18f2f55..07d45dafe1 100644 --- a/responses/sl/HassTurnOff.yaml +++ b/responses/sl/HassTurnOff.yaml @@ -4,7 +4,7 @@ responses: HassTurnOff: default: "Izklapljam {{ state.domain }}" default_name: "Izklapljam {{ slots.name }}" - lights_area: "Luči so izklopljene" + lights_area: "Izklopljeno" cover_device_class: "Zapiram {{ slots.device_class }}" cover_single: "Zapiram {{ slots.name }}" cover: "Zapiram" diff --git a/responses/sl/HassTurnOn.yaml b/responses/sl/HassTurnOn.yaml index ff8467aae5..37beb9888f 100644 --- a/responses/sl/HassTurnOn.yaml +++ b/responses/sl/HassTurnOn.yaml @@ -4,10 +4,10 @@ responses: HassTurnOn: default: "Vklopljeno {{ state.domain }}" default_name: "Vklopljeno {{ slots.name }}" - lights_area: "Luči so vklopljene" + lights_area: "Vklopljeno" fans_area: "Ventilator je vklopljen" cover_device_class: "Odpiram {{ slots.device_class }}" cover_single: "Odpiram {{ slots.name }}" - lock: "Zakljenjena" + lock: "Zaklenjeno" scene: "Aktivirana" script: "Zagnana" diff --git a/responses/zh-cn/HassClimateGetTemperature.yaml b/responses/zh-cn/HassClimateGetTemperature.yaml index ec10b87b46..d7a8936d15 100644 --- a/responses/zh-cn/HassClimateGetTemperature.yaml +++ b/responses/zh-cn/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: zh-cn responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/responses/zh-tw/HassClimateGetTemperature.yaml b/responses/zh-tw/HassClimateGetTemperature.yaml index 3f3cbd9481..ceb6c09785 100644 --- a/responses/zh-tw/HassClimateGetTemperature.yaml +++ b/responses/zh-tw/HassClimateGetTemperature.yaml @@ -2,4 +2,4 @@ language: zh-tw responses: intents: HassClimateGetTemperature: - default: "{{ state.state_with_unit }}" + default: "{{ state_attr(state.entity_id, 'current_temperature') }}" diff --git a/script/intentfest/parse.py b/script/intentfest/parse.py index 0f29a6d68c..26447697a7 100644 --- a/script/intentfest/parse.py +++ b/script/intentfest/parse.py @@ -40,6 +40,14 @@ def get_arguments() -> argparse.Namespace: type=str, help="Sentence(s) to parse", ) + parser.add_argument( + "--context", + action="append", + nargs=2, + default=[], + metavar=("key", "value"), + help="Add key/value pair to context", + ) return parser.parse_args() @@ -68,9 +76,13 @@ def run() -> int: load_merged_responses(args.language).get("responses", {}).get("intents", {}) ) + intent_context = dict(args.context) + # Parse sentences for sentence in args.sentence: - result = recognize(sentence, intents, slot_lists=slot_lists) + result = recognize( + sentence, intents, slot_lists=slot_lists, intent_context=intent_context + ) output_dict = {"text": sentence, "match": result is not None} if result is not None: output_dict["intent"] = result.intent.name diff --git a/script/intentfest/validate.py b/script/intentfest/validate.py index 0f3874df7b..9db3c82ea8 100644 --- a/script/intentfest/validate.py +++ b/script/intentfest/validate.py @@ -528,6 +528,7 @@ def validate_language( }, "slots": slots, "query": {"matched": [], "unmatched": []}, + "state_attr": lambda *args: None, } ) except jinja2.exceptions.TemplateError as err: diff --git a/sentences/cs/_common.yaml b/sentences/cs/_common.yaml index 5d1349a994..aa58d3329b 100644 --- a/sentences/cs/_common.yaml +++ b/sentences/cs/_common.yaml @@ -319,6 +319,7 @@ expansion_rules: roztahnout: "(roz|vy|od)táhn(out|i)" zatahnout: "zatáhn(out|i)" ktere: "(kter(á|é)|jak(é|á))" + prejit: "(přejít|přejdi)" skip_words: - "prosím" diff --git a/sentences/cs/light_HassTurnOff.yaml b/sentences/cs/light_HassTurnOff.yaml index e073b1748d..09209133f4 100644 --- a/sentences/cs/light_HassTurnOff.yaml +++ b/sentences/cs/light_HassTurnOff.yaml @@ -3,15 +3,16 @@ intents: HassTurnOff: data: - sentences: - - " [světlo] {name}" - - " světlo {name}" - - "{name} [světlo]" - - "světlo {name} " + - "(|) [světlo] {name}" + - "{name} (|) [světlo]" + requires_context: + domain: light slots: domain: light response: light - sentences: - - "(|) [všechna] světla " + - " [všechna] světla " + - " [všechna] [světla] " - " (|) [všechna] světla" slots: domain: light @@ -21,5 +22,4 @@ intents: response: "light_all" slots: domain: "light" - area: "all" name: "all" diff --git a/sentences/cs/light_HassTurnOn.yaml b/sentences/cs/light_HassTurnOn.yaml index d1f25db3f2..16fd1a9ebe 100644 --- a/sentences/cs/light_HassTurnOn.yaml +++ b/sentences/cs/light_HassTurnOn.yaml @@ -3,15 +3,16 @@ intents: HassTurnOn: data: - sentences: - - " [světlo] {name}" - - " světlo {name}" - - "{name} [světlo]" - - "světlo {name} " + - "(|) [světlo] {name}" + - "{name} (|) [světlo]" + requires_context: + domain: light slots: domain: light response: light - sentences: - - "(|) [všechna] [světla] " + - " [všechna] světla " + - " [všechna] [světla] " - " (|) [všechna] světla" slots: domain: light diff --git a/sentences/cs/scene_HassTurnOn.yaml b/sentences/cs/scene_HassTurnOn.yaml new file mode 100644 index 0000000000..f7e4ce3054 --- /dev/null +++ b/sentences/cs/scene_HassTurnOn.yaml @@ -0,0 +1,20 @@ +language: cs +intents: + HassTurnOn: + data: + - sentences: + - "(aktivuj|) [scénu] {name}" + - "(|) (na scénu|scénu na) {name}" + requires_context: + domain: scene + slots: + domain: scene + response: scene + - sentences: + - "(aktivuj|) [scénu] {name}" + - "(aktivuj|) [scénu] {name} " + - "(|) (na scénu|scénu na) {name}" + - "(|) (na scénu {name} |scénu na {name})" + slots: + domain: scene + response: scene diff --git a/sentences/cs/todo_HassListAddItem.yaml b/sentences/cs/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..0f50a19c22 --- /dev/null +++ b/sentences/cs/todo_HassListAddItem.yaml @@ -0,0 +1,12 @@ +language: "cs" +intents: + HassListAddItem: + data: + - sentences: + - (dej|přidej|připiš) + response: item_added + requires_context: + domain: todo + expansion_rules: + my_list: "(do[ [mého] seznamu]|na[ [můj] seznam]) {name}" + item: "{shopping_list_item:item}" diff --git a/sentences/de/todo_HassListAddItem.yaml b/sentences/de/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..91c7dc966e --- /dev/null +++ b/sentences/de/todo_HassListAddItem.yaml @@ -0,0 +1,16 @@ +language: de +intents: + HassListAddItem: + data: + - sentences: + - "füge [zu] hinzu" + - "füge [zu] hinzu" + - "(setze|schreibe|nehme) (auf|in) " + - " (auf|in) [setzen|schreiben|nehmen]" + - " [auf|in|zu] hinzufügen" + response: item_added + requires_context: + domain: todo + expansion_rules: + meine_liste: "[meine[r]|die|der] ({name} [Liste]|[Liste] {name})" + item: "{shopping_list_item:item}" diff --git a/sentences/de/weather_HassGetWeather.yaml b/sentences/de/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..aa6330fb5a --- /dev/null +++ b/sentences/de/weather_HassGetWeather.yaml @@ -0,0 +1,10 @@ +language: de +intents: + HassGetWeather: + data: + - sentences: + - "wie ist [das] Wetter [(für|in) ]" + - "wie ist [das] [er|s] Wetter" + - "was für [ein] Wetter (ist|hat es) in " + requires_context: + domain: weather diff --git a/sentences/en/climate_HassClimateGetTemperature.yaml b/sentences/en/climate_HassClimateGetTemperature.yaml index d86cc38c40..98f3e8d1f0 100644 --- a/sentences/en/climate_HassClimateGetTemperature.yaml +++ b/sentences/en/climate_HassClimateGetTemperature.yaml @@ -7,3 +7,6 @@ intents: - "how (hot | cold | warm | cool) is it [in ]" - "is it (hot | cold | warm | cool) [in ]" - " " + - " " + - "[ the] [ of] " + - "how (hot | cold | warm | cool) is " diff --git a/sentences/en/light_HassTurnOff.yaml b/sentences/en/light_HassTurnOff.yaml index 0150a8d81e..dfda98724f 100644 --- a/sentences/en/light_HassTurnOff.yaml +++ b/sentences/en/light_HassTurnOff.yaml @@ -29,14 +29,15 @@ intents: domain: "light" name: "all" - # Turn off all lights in the same area as a satellite device + # Turn off lights in the same area as a satellite device - sentences: - - " off all[ the] lights" - - " all[ the] lights( off;)" + - " off[ the] lights" + - "[ the] lights( off;)" response: "lights_area" expansion_rules: in_here: "[[ in] here]" slots: domain: "light" requires_context: - area: null + area: + slot: true diff --git a/sentences/en/light_HassTurnOn.yaml b/sentences/en/light_HassTurnOn.yaml index 97b6503f0c..962a38a45e 100644 --- a/sentences/en/light_HassTurnOn.yaml +++ b/sentences/en/light_HassTurnOn.yaml @@ -23,12 +23,13 @@ intents: # Turn on all lights in the same area as a satellite device - sentences: - - " on all[ the] lights" - - " all[ the] lights( on;)" + - " on[ the] lights" + - "[ the] lights( on;)" response: "lights_area" expansion_rules: in_here: "[[ in] here]" slots: domain: "light" requires_context: - area: null + area: + slot: true diff --git a/sentences/en/weather_HassGetWeather.yaml b/sentences/en/weather_HassGetWeather.yaml index c93666e94b..52da7750cd 100644 --- a/sentences/en/weather_HassGetWeather.yaml +++ b/sentences/en/weather_HassGetWeather.yaml @@ -3,8 +3,10 @@ intents: HassGetWeather: data: - sentences: - - "[ the] weather[ like][( for| in| at) ]" - - "[ the] weather[( for| in| at) ] like" + - "[ the] weather[ like]" + - sentences: + - "[ the] weather[ like] (for|in|at) " + - "[ the] weather (for|in|at) [ like]" - "[ the] weather[ like]" requires_context: domain: weather diff --git a/sentences/es/climate_HassClimateGetTemperature.yaml b/sentences/es/climate_HassClimateGetTemperature.yaml index 2e8804414f..4a97000015 100644 --- a/sentences/es/climate_HassClimateGetTemperature.yaml +++ b/sentences/es/climate_HassClimateGetTemperature.yaml @@ -7,3 +7,5 @@ intents: - "[a] (cuánta|cuánto|cuántos|qué) (hace|hay|estamos)" - "cuál es " - "[a] (cuánta|cuánto|cuántos|qué) (hace|hacen|hay|está|están|estamos) " + - "cuál es de[l] " + - "[a] (cuánta|cuánto|cuántos|qué) está " diff --git a/sentences/es/light_HassTurnOff.yaml b/sentences/es/light_HassTurnOff.yaml index dda0567707..002983557b 100644 --- a/sentences/es/light_HassTurnOff.yaml +++ b/sentences/es/light_HassTurnOff.yaml @@ -21,11 +21,12 @@ intents: domain: "light" name: "all" - # Turn off all lights in the same area as a satellite device + # Turn off lights in the same area as a satellite device - sentences: - " ((la luz|las luces)[[ de] aquí]|todas las luces [de ]aquí)" response: "lights_area" slots: domain: "light" requires_context: - area: null + area: + slot: true diff --git a/sentences/es/light_HassTurnOn.yaml b/sentences/es/light_HassTurnOn.yaml index 38ee7264e9..22e3036fa4 100644 --- a/sentences/es/light_HassTurnOn.yaml +++ b/sentences/es/light_HassTurnOn.yaml @@ -6,16 +6,20 @@ intents: - " [[(el|la|los|las)] (luz|luces|(interruptor[es]|llave[s] de [la luz]))] [de|del] " requires_context: domain: "light" + - sentences: - " [toda[s]] ([la] luz | [las] luces) " slots: domain: "light" response: "lights_area" + # Turn on all lights in the same area as a satellite device - sentences: + - " la[s] lu(z|ces)" - " ((la luz|las luces)[[ de] aquí]|todas las luces [de ]aquí)" - response: "lights_area" slots: domain: "light" requires_context: - area: null + area: + slot: true + response: "lights_area" diff --git a/sentences/es/weather_HassGetWeather.yaml b/sentences/es/weather_HassGetWeather.yaml index 692d59bb44..e039e02759 100644 --- a/sentences/es/weather_HassGetWeather.yaml +++ b/sentences/es/weather_HassGetWeather.yaml @@ -3,6 +3,8 @@ intents: HassGetWeather: data: - sentences: - - "qué tiempo hace [en ]" + - "qué tiempo hace" + - sentences: + - "qué tiempo hace en " requires_context: domain: weather diff --git a/sentences/fr/_common.yaml b/sentences/fr/_common.yaml index df4a4140b6..b19c504df8 100644 --- a/sentences/fr/_common.yaml +++ b/sentences/fr/_common.yaml @@ -299,6 +299,9 @@ lists: shopping_list_item: wildcard: true + zone: + wildcard: true + expansion_rules: name: "[le |la |les |[l']]{name}" area: "[le |la |[l']]{area}" @@ -317,7 +320,7 @@ expansion_rules: volets: "[les ](volets|stores)" garage: "([la ]porte (du |de )garage)|([le ]garage)" fenetre: "(fen(e|ê)tre[s]|baie[s]|v(e|é)lux|lucarne[s])" - dans: "(dans|du|de)" + dans: "(dans|du|de|à|au)" de: "(du|de)" yatil: "(y a[-][ ]t[-][']il|il y a)" estil: "(est|sont)[-][ ][(il[s]|elle[s])]" @@ -327,6 +330,10 @@ expansion_rules: appareil: "(appareil|machine|équipement)[s]" tous: "(tout|tous|toute[s])" eclaire: (éclaire|éclairer|illumine|illuminer) + quelest: " (est|sont)" + # Questions + what_is_the_class_of_name: " (le |la |l'|les ) [(indiqué[e][s]|mesuré[e][s]|renvoyé[e][s]|restant[e][s]|retourné[e][s]|utilisé[e][s]|produit[e][s]|consommé[e][s]|donné[e][s]) ][(par||sur)] [ ]" + skip_words: - "s'il te plaît" - "stp" diff --git a/sentences/fr/climate_HassClimateGetTemperature.yaml b/sentences/fr/climate_HassClimateGetTemperature.yaml index e6c4209a1f..136092ca14 100644 --- a/sentences/fr/climate_HassClimateGetTemperature.yaml +++ b/sentences/fr/climate_HassClimateGetTemperature.yaml @@ -3,5 +3,5 @@ intents: HassClimateGetTemperature: data: - sentences: - - "Quelle est la température [ ]" - - "Combien fait-il [ ]" + - "Quelle est la température [] []" + - "Combien fait-il [] []" diff --git a/sentences/fr/homeassistant_HassNevermind.yaml b/sentences/fr/homeassistant_HassNevermind.yaml new file mode 100644 index 0000000000..aa7192b470 --- /dev/null +++ b/sentences/fr/homeassistant_HassNevermind.yaml @@ -0,0 +1,7 @@ +language: fr +intents: + HassNevermind: + data: + - sentences: + - "oublie[s]" + - "Annule[r]" diff --git a/sentences/fr/lock_HassTurnOff.yaml b/sentences/fr/lock_HassTurnOff.yaml index bfd3fff6ad..88a83d2bbd 100644 --- a/sentences/fr/lock_HassTurnOff.yaml +++ b/sentences/fr/lock_HassTurnOff.yaml @@ -3,13 +3,13 @@ intents: HassTurnOff: data: - sentences: - - "déverrouille [ ]" + - "déverrouille[(z|r)] [ ]" requires_context: domain: lock response: lock - sentences: - - "déverrouille [] [(la|le[s])] [(porte[s]|serrure[s]|verrou[s])] [] " + - "déverrouille[(z|r)] [] [(la|le[s])] [(porte[s]|serrure[s]|verrou[s])] [] " slots: domain: "lock" name: "all" diff --git a/sentences/fr/lock_HassTurnOn.yaml b/sentences/fr/lock_HassTurnOn.yaml index 7095271b58..7d88ea1baf 100644 --- a/sentences/fr/lock_HassTurnOn.yaml +++ b/sentences/fr/lock_HassTurnOn.yaml @@ -3,14 +3,14 @@ intents: HassTurnOn: data: - sentences: - - "verrouille [ ]" + - "verrouille[(z|r)] [ ]" requires_context: domain: lock response: lock - sentences: - - "verrouille [] [(la|le[s])] [(porte[s]|serrure[s]|verrou[s])] [] " - - "verrouille [] (la|le[s]) (porte[s]|serrure[s]|verrou[s]) [ ]" + - "verrouille[(z|r)] [] [(la|le[s])] [(porte[s]|serrure[s]|verrou[s])] [] " + - "verrouille[(z|r)] [] (la|le[s]) (porte[s]|serrure[s]|verrou[s]) [ ]" slots: domain: "lock" name: "all" diff --git a/sentences/fr/person_HassGetState.yaml b/sentences/fr/person_HassGetState.yaml new file mode 100644 index 0000000000..d8c532d63a --- /dev/null +++ b/sentences/fr/person_HassGetState.yaml @@ -0,0 +1,44 @@ +language: fr +intents: + HassGetState: + data: + # https://www.home-assistant.io/integrations/person/ + - sentences: + - "o(u|ù) est " + response: where + requires_context: + domain: person + slots: + domain: person + + - sentences: + - " (|à|au) [(le|la|l')] {zone:state}" + response: one_yesno + requires_context: + domain: person + slots: + domain: person + + - sentences: + - " (quelqu'un|du monde) (|à|au) [(le|la|l')] {zone:state}" + response: any_short + slots: + domain: person + + - sentences: + - " (le monde|les membres de la famille) (|à|au) [(le|la|l')] {zone:state}" + response: all + slots: + domain: person + + - sentences: + - "Qui est (|à|au) [(le|la|l')] {zone:state}" + response: which_person + slots: + domain: person + + - sentences: + - "Combien de (personnes|membres de la famille) (|à|au) [(le|la|l')] {zone:state}" + response: how_many + slots: + domain: person diff --git a/sentences/fr/sensor_HassGetState.yaml b/sentences/fr/sensor_HassGetState.yaml new file mode 100644 index 0000000000..258f9956af --- /dev/null +++ b/sentences/fr/sensor_HassGetState.yaml @@ -0,0 +1,622 @@ +language: fr +intents: + HassGetState: + data: + # https://www.home-assistant.io/integrations/sensor/ + # Apparent power + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: apparent_power + slots: + domain: sensor + device_class: apparent_power + expansion_rules: + class: "puissance[ apparente]" + + # AQI + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: aqi + slots: + domain: sensor + device_class: aqi + expansion_rules: + class: "(qualité de l'air|pollution)" + + # Atmospheric pressure + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: atmospheric_pressure + slots: + domain: sensor + device_class: atmospheric_pressure + expansion_rules: + class: "pression atmosphérique" + + # Battery + - sentences: + - "" + - "combien de batterie " + - "combien de batterie reste-il dans " + response: default + requires_context: + domain: sensor + device_class: battery + slots: + domain: sensor + device_class: battery + expansion_rules: + class: "[niveau de] batterie [restant]" + + # CO2 + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: carbon_dioxide + slots: + domain: sensor + device_class: carbon_dioxide + expansion_rules: + class: "[(niveau|concentration) de ](CO2|dioxyde de carbone)" + + # CO + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: carbon_monoxide + slots: + domain: sensor + device_class: carbon_monoxide + expansion_rules: + class: "[(niveau|concentration) de ](CO|monoxyde de carbone)" + + # Current + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: current + slots: + domain: sensor + device_class: current + expansion_rules: + class: "[quantité de] courant [(é|e)lectrique]" + + # # Data rate + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: data_rate + slots: + domain: sensor + device_class: data_rate + expansion_rules: + class: "(vitesse de téléchargement|débit) [(montant[e]|descendant[e])]" + + # Data size + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: data_size + slots: + domain: sensor + device_class: data_size + expansion_rules: + class: "(quantité|volume|taille) [(de|des)] [donné][e][s]" + + # Date + - sentences: + - "" + - "(Quand|Quel[l][e]) est [(le|la) prochain[e]] [(évènement|date)] [de] " + response: default + requires_context: + domain: sensor + device_class: date + slots: + domain: sensor + device_class: date + expansion_rules: + class: "date" + + # Distance + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: distance + slots: + domain: sensor + device_class: distance + expansion_rules: + class: "(distance|kilométr[ag][e][s])" + + # Duration + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: duration + slots: + domain: sensor + device_class: duration + expansion_rules: + class: "durée" + + # Energy + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: energy + slots: + domain: sensor + device_class: energy + expansion_rules: + class: "[quantité d']énergie" + + # Energy storage + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: energy_storage + slots: + domain: sensor + device_class: energy_storage + expansion_rules: + class: "[(total|quantité)] [d']énergie stockée" + + # # Skipping enum + + # Frequency + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: frequency + slots: + domain: sensor + device_class: frequency + expansion_rules: + class: "fréquence" + + # Gas + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: gas + slots: + domain: sensor + device_class: gas + expansion_rules: + class: "[(Quantité|Volume) [de]] gaz" + + # Humidity + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: humidity + slots: + domain: sensor + device_class: humidity + expansion_rules: + class: "[taux d']humidité[ (de l'air|relati(f|ve))]" + + # Illuminance + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: illuminance + slots: + domain: sensor + device_class: illuminance + expansion_rules: + class: "[niveau de ]luminosité" + + # Irradiance + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: irradiance + slots: + domain: sensor + device_class: irradiance + expansion_rules: + class: "[niveau d'](irradiance|irradiation)" + + # # Moisture + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: moisture + slots: + domain: sensor + device_class: moisture + expansion_rules: + class: "[taux d']humidité[ (du sol| relati(f|ve))]" + + # Monetary + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: monetary + slots: + domain: sensor + device_class: monetary + expansion_rules: + class: "(coût|montant)" + + # Nitrogen dioxide + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: nitrogen_dioxide + slots: + domain: sensor + device_class: nitrogen_dioxide + expansion_rules: + class: "[(niveau|concentration) de ](dioxyde d'azote|NO2)" + + # Nitrogen monoxide + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: nitrogen_monoxide + slots: + domain: sensor + device_class: nitrogen_monoxide + expansion_rules: + class: "[(niveau|concentration) de ](monoxyde d'azote|NO)" + + # Nitrous oxide + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: nitrous_oxide + slots: + domain: sensor + device_class: nitrous_oxide + expansion_rules: + class: "[(niveau|concentration) de ](protoxyde d'azote|N2O)" + + # Ozone + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: ozone + slots: + domain: sensor + device_class: ozone + expansion_rules: + class: "[(niveau|concentration) (d'|de )](ozone|O3)" + + # PM1 + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: pm1 + slots: + domain: sensor + device_class: pm1 + expansion_rules: + class: "[(niveau|concentration) de ](particules [fines]|PM1)" + + # PM2.5 + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: pm25 + slots: + domain: sensor + device_class: pm25 + expansion_rules: + class: "[(niveau|concentration) de ](particules [fines]|PM2.5)" + + # PM10 + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: pm10 + slots: + domain: sensor + device_class: pm10 + expansion_rules: + class: "[(niveau|concentration) de ](particules [fines]|PM10)" + + # Power factor + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: power_factor + slots: + domain: sensor + device_class: power_factor + expansion_rules: + class: "facteur de puissance" + + # Power + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: power + slots: + domain: sensor + device_class: power + expansion_rules: + class: "puissance" + + # Precipitation + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: precipitation + slots: + domain: sensor + device_class: precipitation + expansion_rules: + class: "[cumul|quantité|niveau de ](pr(e|é)cipitation[s]|pluie|neige)" + + # Precipitation intensity + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: precipitation_intensity + slots: + domain: sensor + device_class: precipitation_intensity + expansion_rules: + class: "intensité de (pr(e|é)cipitation[s]|pluie|neige)" + + # Pressure + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: pressure + slots: + domain: sensor + device_class: pressure + expansion_rules: + class: "pression" + + # Reactive power + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: reactive_power + slots: + domain: sensor + device_class: reactive_power + expansion_rules: + class: "puissance r(é|e)active" + + # Signal strength + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: signal_strength + slots: + domain: sensor + device_class: signal_strength + expansion_rules: + class: "(force|puissance) (de|du) signal" + + # Sound pressure + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: sound_pressure + slots: + domain: sensor + device_class: sound_pressure + expansion_rules: + class: "[puissance de ]pression acoustique" + + # Speed + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: speed + slots: + domain: sensor + device_class: speed + expansion_rules: + class: "(vitesse|velocité|allure)" + + # Sulphur dioxide + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: sulphur_dioxide + slots: + domain: sensor + device_class: sulphur_dioxide + expansion_rules: + class: "[(niveau|concentration) de ](dioxyde de soufre|SO2)" + + # Temperature + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: temperature + slots: + domain: sensor + device_class: temperature + expansion_rules: + class: "temp(e|é)rature" + + # # Skipping Timestamp + + # Volatile organic compounds + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: volatile_organic_compounds + slots: + domain: sensor + device_class: volatile_organic_compounds + expansion_rules: + class: "[(concentration|niveau) de ](VOC[s]|COV|composé[s] [organique[s]] volatil[s])" + + # Volatile organic compounds + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: volatile_organic_compounds_parts + slots: + domain: sensor + device_class: volatile_organic_compounds_parts + expansion_rules: + class: "[(concentration|niveau) de ]particules de (VOC[s]|COV|composé[s] [organique[s]] volatil[s])" + + # Voltage + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: voltage + slots: + domain: sensor + device_class: voltage + expansion_rules: + class: "volt[s][age]" + + # Volume + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: volume + slots: + domain: sensor + device_class: volume + expansion_rules: + class: "volume" + + # Volume storage + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: volume_storage + slots: + domain: sensor + device_class: volume_storage + expansion_rules: + class: "volume [total] [stocké]" + + # Water + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: water + slots: + domain: sensor + device_class: water + expansion_rules: + class: "[(quantité|consommation) ][totale ][d']eau[ consommée]" + + # Weight + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: weight + slots: + domain: sensor + device_class: weight + expansion_rules: + class: "(poids|masse)" + + # Wind speed + - sentences: + - "" + response: default + requires_context: + domain: sensor + device_class: wind_speed + slots: + domain: sensor + device_class: wind_speed + expansion_rules: + class: "[vitesse ][du ][vent]" diff --git a/sentences/fr/shopping_list_HassShoppingListAddItem.yaml b/sentences/fr/shopping_list_HassShoppingListAddItem.yaml index ee3929b955..0c15303bc1 100644 --- a/sentences/fr/shopping_list_HassShoppingListAddItem.yaml +++ b/sentences/fr/shopping_list_HassShoppingListAddItem.yaml @@ -7,5 +7,5 @@ intents: - met[s] [du|de la|des] (dans|à) response: item_added expansion_rules: - my_list: " (la|ma|notre) liste [de] [(course[s]|shopping)]" + my_list: " (la|ma|notre) liste [(de|d')] [(achat[s]|course[s]|shopping)]" item: "{shopping_list_item:item}" diff --git a/sentences/fr/todo_HassListAddItem.yaml b/sentences/fr/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..90b3601189 --- /dev/null +++ b/sentences/fr/todo_HassListAddItem.yaml @@ -0,0 +1,11 @@ +language: fr +intents: + HassListAddItem: + data: + - sentences: + - (ajoute|met)[s] (dans|à) [la liste] [de] {name} + response: item_added + requires_context: + domain: todo + expansion_rules: + item: "{shopping_list_item:item}" diff --git a/sentences/fr/weather_HassGetWeather.yaml b/sentences/fr/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..7ace608a92 --- /dev/null +++ b/sentences/fr/weather_HassGetWeather.yaml @@ -0,0 +1,10 @@ +language: fr +intents: + HassGetWeather: + data: + - sentences: + - "(|donne[s][-moi]) (le|la|les) (temps|météo|prévision[s]) (pour|à) " + - "(Donne-moi|Dis-moi) le temps qu'il fait à " + - "Quel temps fait-il à " + requires_context: + domain: weather diff --git a/sentences/nl/_common.yaml b/sentences/nl/_common.yaml index 4314c2c2cc..f1f0ad0ba5 100644 --- a/sentences/nl/_common.yaml +++ b/sentences/nl/_common.yaml @@ -310,6 +310,9 @@ lists: shopping_list_item: wildcard: true + zone: + wildcard: true + expansion_rules: # generic expansion rules for sentences name: "[de|het] {name}" diff --git a/sentences/nl/person_HassGetState.yaml b/sentences/nl/person_HassGetState.yaml new file mode 100644 index 0000000000..9d133c1998 --- /dev/null +++ b/sentences/nl/person_HassGetState.yaml @@ -0,0 +1,111 @@ +language: nl +intents: + HassGetState: + data: + # https://www.home-assistant.io/integrations/person/ + - sentences: + - "waar [is|zijn] " + - "waar bevind[t|en] zich" + response: where + requires_context: + domain: person + slots: + domain: person + + - sentences: + - "[is|zijn] thuis" + response: one_zone + requires_context: + domain: person + slots: + domain: person + state: home + - sentences: + - "[is|zijn] (niet thuis|weg)" + response: one_zone + requires_context: + domain: person + slots: + domain: person + state: not_home + - sentences: + - "[is|zijn] [] [de|het] [zone] {zone:state}" + response: one_zone + requires_context: + domain: person + excludes_context: + state: home + slots: + domain: person + + - sentences: + - "is [er] iemand thuis" + response: any + slots: + domain: person + state: home + - sentences: + - "is [er] iemand (niet thuis|weg)" + response: any + slots: + domain: person + state: not_home + - sentences: + - "is [er] iemand [] [de|het] {zone:state}" + response: any + slots: + domain: person + + - sentences: + - "is iedereen thuis" + response: all + slots: + domain: person + state: home + - sentences: + - "is iedereen (niet thuis|weg)" + response: all + slots: + domain: person + state: not_home + - sentences: + - "is iedereen [] [de|het] {zone:state}" + response: all + slots: + domain: person + + - sentences: + - "wie (is|zijn) [er] [allemaal] thuis" + response: which + slots: + domain: person + state: home + - sentences: + - "wie (is|zijn) [er] [allemaal] (niet thuis|weg)" + response: which + slots: + domain: person + state: not_home + - sentences: + - "wie (is|zijn) [er] [allemaal] [] [de|het] {zone:state}" + response: which + slots: + domain: person + + - sentences: + - "hoe[ ]veel mensen zijn [er] thuis" + response: how_many + slots: + domain: person + state: home + - sentences: + - "hoe[ ]veel mensen zijn [er] (niet thuis|weg)" + response: how_many + slots: + domain: person + state: not_home + - sentences: + - "hoe[ ]veel mensen zijn [er] [] [de|het] {zone:state}" + response: how_many + slots: + domain: person diff --git a/sentences/nl/todo_HassListAddItem.yaml b/sentences/nl/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..c937d1e436 --- /dev/null +++ b/sentences/nl/todo_HassListAddItem.yaml @@ -0,0 +1,14 @@ +language: "nl" +intents: + HassListAddItem: + data: + - sentences: + - voeg toe (aan|op|voor) + - voeg (aan|op|voor) toe + - zet op + response: item_added + requires_context: + domain: todo + expansion_rules: + my_list: "[ mijn| de| het] {name}[[ ][boodschappen[ ]]lijst[je]]" + item: "{shopping_list_item:item}" diff --git a/sentences/nl/weather_HassGetWeather.yaml b/sentences/nl/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..70793493b6 --- /dev/null +++ b/sentences/nl/weather_HassGetWeather.yaml @@ -0,0 +1,9 @@ +language: nl +intents: + HassGetWeather: + data: + - sentences: + - (wat|hoe) is (het weer|de weersvoorspelling) [buiten] + - (wat|hoe) is ((het weer|de weersvoorspelling);[( voor| in| volgens) ]) + requires_context: + domain: weather diff --git a/sentences/ro/_common.yaml b/sentences/ro/_common.yaml index 1eac587bd4..cf67902c88 100644 --- a/sentences/ro/_common.yaml +++ b/sentences/ro/_common.yaml @@ -551,6 +551,8 @@ expansion_rules: cate_class_sunt_state_in_zona: " ((sunt; ); [])" cate_class_verbState_in_zona: " (; [])" cate_detecteaza_object_in_zona: " ({bs_detection_states_active:state} ; [])" + + ce_class_indica_name_in_zona: "((ce|c(â|a)t[(ă|a)]) (indic(ă|a)|m(ă|a)soar(ă|a)|arat(ă|a)|are) [] | (|) ((indicat[(ă|a)]|ar(ă|a)tat[(ă|a)]|m(ă|a)surat[(ă|a)]) de[ c(ă|a)tre]|(a[l] [lui]|lui)) [])" skip_words: - "mulțumesc" - "multumesc" diff --git a/sentences/ro/climate_HassClimateGetTemperature.yaml b/sentences/ro/climate_HassClimateGetTemperature.yaml index 177fca3656..59bc7a855e 100644 --- a/sentences/ro/climate_HassClimateGetTemperature.yaml +++ b/sentences/ro/climate_HassClimateGetTemperature.yaml @@ -2,18 +2,20 @@ language: ro intents: HassClimateGetTemperature: data: + - sentences: + - "" + expansion_rules: + class_singular: "" - sentences: - "ce " - "(care | ) " - " grade sunt " - - " de " - - " de " + - " (de ;) " - " " - sentences: - "ce " - "(care | ) " - " grade sunt" - - " de " - - " de " + - " (de ;)" requires_context: area: diff --git a/sentences/ro/light_HassTurnOff.yaml b/sentences/ro/light_HassTurnOff.yaml index e9b618566b..88b7485557 100644 --- a/sentences/ro/light_HassTurnOff.yaml +++ b/sentences/ro/light_HassTurnOff.yaml @@ -21,4 +21,5 @@ intents: domain: light requires_context: area: + slot: true response: lights_area diff --git a/sentences/ro/light_HassTurnOn.yaml b/sentences/ro/light_HassTurnOn.yaml index 515a038831..5b85b0aa44 100644 --- a/sentences/ro/light_HassTurnOn.yaml +++ b/sentences/ro/light_HassTurnOn.yaml @@ -21,4 +21,5 @@ intents: domain: light requires_context: area: + slot: true response: lights_area diff --git a/sentences/ro/weather_HassGetWeather.yaml b/sentences/ro/weather_HassGetWeather.yaml index e03af8e192..2d4cce9df7 100644 --- a/sentences/ro/weather_HassGetWeather.yaml +++ b/sentences/ro/weather_HassGetWeather.yaml @@ -2,6 +2,10 @@ language: ro intents: HassGetWeather: data: + - sentences: + - "cum vremea[ afar(ă|a)]" + - "c(â|a)te grade sunt afar(ă|a)" + - " (de (frig|cald);) afar(ă|a)" - sentences: - "cum (vremea|afar(ă|a))[ [ ]]" - "c(â|a)te grade sunt[ afar(ă|a)][ [ ]]" diff --git a/sentences/sl/_common.yaml b/sentences/sl/_common.yaml index 8f1213608e..cc1cca1f73 100644 --- a/sentences/sl/_common.yaml +++ b/sentences/sl/_common.yaml @@ -98,37 +98,53 @@ lists: out: window lock_states: values: - - in: "zaklenjen[a|i|o]" + - in: "zaklenjen[a|i|o|ih]" out: "locked" - in: "odklenjen[a|i|o]" out: "unlocked" + shopping_list_item: + wildcard: true + zone: + wildcard: true + + # binary sensors + bs_presence_states: + values: + - in: "(doma|prisoten)" + out: "on" + - in: "(proč|ni prisoten)" + out: "off" expansion_rules: name: "{name}" - area: "[v | na] {area}[sob[o|e|i|ah]| prostor[u||e|a|ih]| kuhinj(i|a|skem|ski|ske|sko) [prosto[r|ru|re|rih]]| dnevn(i|em|ih) prostor[u|ih]| dnevn(i|a) sob(i|a)| spalni(ca|i)]| zuna(nja|j)" + area: "[v | na] {area}[sob[o|e|i|ah]| prostor[u||e|a|ih]| kuhinj(i|a|skem|ski|ske|sko) [prosto[r|ru|re|rih]]| dnevn(i|em|ih) [prostor[u|ih]]| dnevn(i|a) sob(i|a)| spalni(ca|ci)]| zuna(nja|j)" brightness: "{brightness}[%| procent(a|e|ov|i)| odstot(ek|ka|kov|ki|kov|kih)| svetlost[i]]" color: "{color}[barv[o|e|i]| odten[ek|ke]| barv[e]]" + dodaj: "dodaj|daj" svetlost: "{brightness}" temperature: "{temperature}[°| | celzija] [{temperature_unit}|°C ] " stopinj: "(stopin(j|ja|ji|je))" temp: "temperatur[a|i|e|o]" - set: "(nastavi|spremeni|prilagodi|segrej|ohladi|dvigni|znižaj|spusti)" + set: "(nastavi|spremeni|prilagodi|segrej|ohladi|dvigni|znižaj|spusti|dodaj)" #spremeni: "(nastavi|spremeni|prilagodi|segrej|ohladi|dvigni|znižaj|spusti)" close: "(zapri|spusti|zagrni|zatesni|z[a]vij)" open: "(odpri|dvigni|odgrni|razkrij|razvij|odkrij)" covers: "([garažna|vhodna|balkonska|zadnja|sprednja|drsna|kuhinjska]) vrata| [strešn(o|i|a|ih)|kuhinjsk(o|a|i)] ok(no|ni|na|en) | rolet(a|o|i|e) | žaluzij(a|o|i|e) | markiz(a|i|e|o) | tend(a|i|e|o) | [pokrov|pokrivalo] bazena | ograj(a|i|e|o) | zaves(a|o|i|e)" - vklopi: "vključi[te|mo]|vklopi[te|mo]" - vključi: "vključi[te|mo]|vklopi[te|mo]" - izklopi: "izključi[te|mo]|ugasni[te|mo|izklopi]" + vklopi: "vključi[te|mo]|vklopi[te|mo]|prižg[i|te]" + vključi: "vključi[te|mo]|vklopi[te|mo]|prižg[i|te]" + prižgi: "vključi[te|mo]|vklopi[te|mo]|prižg[i|te]" + izklopi: "izključi[te|mo]|ugasni[te|mo]|izklopi[te]" izključi: "izključi[te|mo]|ugasni[te|mo|izklopi]" spremeni: "spremeni|prilagodi|nastavi|zamenjaj|zmanjšaj|povečaj|znižaj|ohladi|segrej" odpri: "odpri[te|mo]|dvigni[te|mo]" 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" + kje_je: "kje je|kje|kje so|kje se nahaja[jo|ta]" vse: "[vsi|vsa|vse|vso]" vsa: "[vsi|vsa|vse|vso]" - lock: "vrata" + lock: "vrat[a]|ključavnic(e|a|o)" luč: "luč[i|ke|ko|ki|k]|svetil[a|i|o]|razsvetljav[e|o|a]|svetilk[e|o|a]" skip_words: diff --git a/sentences/sl/climate_HassClimateGetTemperature.yaml b/sentences/sl/climate_HassClimateGetTemperature.yaml index aa486b3e03..b894588c72 100644 --- a/sentences/sl/climate_HassClimateGetTemperature.yaml +++ b/sentences/sl/climate_HassClimateGetTemperature.yaml @@ -9,3 +9,5 @@ intents: - "koliko stopinj je [[v|na] ]" - "povej mi [[v|na] ]" - "kakšna je [] temperatura" + - "kakšna je [] " + - "na koliko [stopinj] je [nastavljena] [[v|na] ]" diff --git a/sentences/sl/homeassistant_HassNevermind.yaml b/sentences/sl/homeassistant_HassNevermind.yaml new file mode 100644 index 0000000000..2d41ce33cb --- /dev/null +++ b/sentences/sl/homeassistant_HassNevermind.yaml @@ -0,0 +1,10 @@ +language: sl +intents: + HassNevermind: + data: + - sentences: + - "prekini" + - "odnehaj" + - "prekliči" + - "nima veze" + - "pozabi [na] [to] [kar sem rek[el|la]]" diff --git a/sentences/sl/light_HassTurnOff.yaml b/sentences/sl/light_HassTurnOff.yaml index ad7cf26522..fe075a0c06 100644 --- a/sentences/sl/light_HassTurnOff.yaml +++ b/sentences/sl/light_HassTurnOff.yaml @@ -4,6 +4,7 @@ intents: data: - sentences: - " [v|na] [sobi|prostoru] " + - " [v|na] [sobi|prostoru] " - " [vse] [luči|svetilke] [v] " - " [vsa] [svetila] [v] " - " [vso] [razsvetljavo] [v] " diff --git a/sentences/sl/light_HassTurnOn.yaml b/sentences/sl/light_HassTurnOn.yaml index 7fac66a44b..2d741e04dd 100644 --- a/sentences/sl/light_HassTurnOn.yaml +++ b/sentences/sl/light_HassTurnOn.yaml @@ -4,6 +4,7 @@ intents: data: - sentences: - " [v|na] " + - " [v|na] " - " [vs[a|e]] [v] " - " [vsa] [v] " - " [vso] [razsvetljavo] [v] " diff --git a/sentences/sl/lock_HassGetState.yaml b/sentences/sl/lock_HassGetState.yaml new file mode 100644 index 0000000000..60d1afb9ca --- /dev/null +++ b/sentences/sl/lock_HassGetState.yaml @@ -0,0 +1,36 @@ +language: sl +intents: + HassGetState: + data: + - sentences: + - "(ali so|je |ali je|so) {lock_states:state} [[v|na] ]" + response: one_yesno + requires_context: + domain: lock + slots: + domain: lock + + - sentences: + - "(ali so|ali je|je|so) [katera|kakšna] {lock_states:state} [[v|na] ]" + - "(ali so|ali je|je|so) [katera|kakšna] {lock_states:state} [[v|na] ]" + response: any + slots: + domain: lock + + - sentences: + - "(ali so|so) (vse|vsa) {lock_states:state} [[v|na] ]" + response: all + slots: + domain: lock + + - sentences: + - "(katere|katera) [je|so] {lock_states:state} [[v|na] ]" + response: which + slots: + domain: lock + + - sentences: + - "koliko je {lock_states:state} [[v|na] ]" + response: how_many + slots: + domain: lock diff --git a/sentences/sl/lock_HassTurnOff.yaml b/sentences/sl/lock_HassTurnOff.yaml new file mode 100644 index 0000000000..ebab958dad --- /dev/null +++ b/sentences/sl/lock_HassTurnOff.yaml @@ -0,0 +1,17 @@ +language: sl +intents: + HassTurnOff: + data: + - sentences: + - "odkleni [[v|na] ]" + requires_context: + domain: lock + response: lock + + - sentences: + - "odkleni [vsa|vse] [[v|na] ]" + - "odkleni [vsa|vse] " + slots: + domain: "lock" + name: "all" + response: lock diff --git a/sentences/sl/lock_HassTurnOn.yaml b/sentences/sl/lock_HassTurnOn.yaml new file mode 100644 index 0000000000..740f788419 --- /dev/null +++ b/sentences/sl/lock_HassTurnOn.yaml @@ -0,0 +1,16 @@ +language: sl +intents: + HassTurnOn: + data: + - sentences: + - "zakleni [[v|na] ]" + requires_context: + domain: lock + response: lock + - sentences: + - "zakleni [vse|vsa] [[v|na] ]" + - "zakleni [vse|vsa] " + slots: + domain: "lock" + name: "all" + response: lock diff --git a/sentences/sl/person_HassGetState.yaml b/sentences/sl/person_HassGetState.yaml new file mode 100644 index 0000000000..fc71a6f44f --- /dev/null +++ b/sentences/sl/person_HassGetState.yaml @@ -0,0 +1,44 @@ +language: sl +intents: + HassGetState: + data: + # https://www.home-assistant.io/integrations/person/ + - sentences: + - " " + response: where + requires_context: + domain: person + slots: + domain: person + + - sentences: + - "[ali] je [v|na] {zone:state}" + response: one_yesno + requires_context: + domain: person + slots: + domain: person + + - sentences: + - "[ali] je (nekdo|kdo) [v|na] {zone:state}" + response: any + slots: + domain: person + + - sentences: + - "ali so vsi [v|na] {zone:state}" + response: all + slots: + domain: person + + - sentences: + - "kdo je [v|na] {zone:state}" + response: which + slots: + domain: person + + - sentences: + - "koliko (oseb|ljudi) je [v|na] {zone:state}" + response: how_many + slots: + domain: person diff --git a/sentences/sl/scene_HassTurnOn.yaml b/sentences/sl/scene_HassTurnOn.yaml new file mode 100644 index 0000000000..cf22855a01 --- /dev/null +++ b/sentences/sl/scene_HassTurnOn.yaml @@ -0,0 +1,11 @@ +language: sl +intents: + HassTurnOn: + data: + - sentences: + - "(aktiviraj||zaženi) [sceno] [sceno]" + requires_context: + domain: scene + slots: + domain: scene + response: scene diff --git a/sentences/sl/script_HassTurnOn.yaml b/sentences/sl/script_HassTurnOn.yaml new file mode 100644 index 0000000000..b58bd8b237 --- /dev/null +++ b/sentences/sl/script_HassTurnOn.yaml @@ -0,0 +1,11 @@ +language: sl +intents: + HassTurnOn: + data: + - sentences: + - "(aktiviraj||zaženi) [skripto] " + requires_context: + domain: script + slots: + domain: script + response: script diff --git a/sentences/sl/shopping_list_HassShoppingListAddItem.yaml b/sentences/sl/shopping_list_HassShoppingListAddItem.yaml new file mode 100644 index 0000000000..2fe27b5e1e --- /dev/null +++ b/sentences/sl/shopping_list_HassShoppingListAddItem.yaml @@ -0,0 +1,10 @@ +language: sl +intents: + HassShoppingListAddItem: + data: + - sentences: + - (dodaj| daj) (v|na) [moj] + response: item_added + expansion_rules: + my_list: "[nakupovalni] (seznam|lista) [za] [nakup[e]|nabavo|trgovino|šoping|fasungo]" + item: "{shopping_list_item:item}" diff --git a/sentences/sl/todo_HassListAddItem.yaml b/sentences/sl/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..5047049356 --- /dev/null +++ b/sentences/sl/todo_HassListAddItem.yaml @@ -0,0 +1,12 @@ +language: "sl" +intents: + HassListAddItem: + data: + - sentences: + - dodaj na [seznam|listo] [za] + response: item_added + requires_context: + domain: todo + expansion_rules: + my_list: "[moj|skupen|družinski|tedenski] [seznam|listo] [za] {name}" + item: "{shopping_list_item:item}" 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/sentences/uk/_common.yaml b/sentences/uk/_common.yaml index bc3a24d4b8..b7c9f2f692 100644 --- a/sentences/uk/_common.yaml +++ b/sentences/uk/_common.yaml @@ -28,6 +28,10 @@ lists: out: "purple" - in: "коричневий | коричнев(им|ою|ого)" out: "brown" + - in: "рожевий | рожев(им|ою|ого)" + out: "pink" + - in: "бірюзовий | бірюзов(им|ою|ого)" + out: "turquoise" brightness: range: type: "percentage" @@ -44,6 +48,18 @@ lists: out: "celsius" - in: "f | фаренгейту | за фаренгейтом" out: "fahrenheit" + brightness_level: + values: + - in: "максим(альна|ий) | максимум | [як] найяскравіше | [дуже|над] яскрав(о|ий)" + out: 100 + - in: "три чверті" + out: 75 + - in: "середн(ій|я|ю) | (на|в|у) половин(а|у) | [у|в] півсили" + out: 50 + - in: "(на) чверть" + out: 25 + - in: "мінімум | мінімальний| тускл(ий|о) | найтускліший | приглуш(ений|но)" + out: 1 on_off_states: values: - in: "(в|у)вімкнен(ий|на|і|их|о) | (в|у)вімкнут(ий|а|і|их|о)" @@ -70,7 +86,7 @@ lists: out: "closing" cover_classes: values: - - in: awning[s] + - in: тент[и] out: awning - in: жалюзі out: blind @@ -82,13 +98,211 @@ lists: out: garage - in: брам[а|и] | вор(о|і)т[а] out: gate - - in: shade[s] + - in: ролет[и] | заслінк(а|и) out: shade - in: ставні | ставень out: shutter - in: вікн(о|а) | вікон out: window + # Lock domain + lock_states: + values: + - in: "закрит(о|ий|а) | замкнен(о|ий|а) | зачинен(о|ий|а)" + out: "locked" + - in: "відкрит(о|ий|а) | відімкнен(о|ий|а) | відчинен(о|ий|а)" + out: "unlocked" + + # binary_sensor + bs_battery_states: + values: + - in: "низький" + out: "on" + - in: "нормальний" + out: "off" + + bs_battery_charging_states: + values: + - in: "заряджається" + out: "on" + - in: "не заряджається" + out: "off" + + bs_carbon_monoxide_states: + values: + - in: "виявлено" + out: "on" + - in: "чисто" + out: "off" + + bs_cold_states: + values: + - in: "холодно" + out: "on" + - in: "нормально" + out: "off" + + bs_connectivity_states: + values: + - in: "підключено" + out: "on" + - in: "відключено" + out: "off" + + bs_door_states: + values: + - in: "відкриті" + out: "on" + - in: "закриті" + out: "off" + + bs_garage_door_states: + values: + - in: "відкриті" + out: "on" + - in: "закриті" + out: "off" + + bs_gas_states: + values: + - in: "виявлено" + out: "on" + - in: "чисто" + out: "off" + + bs_heat_states: + values: + - in: "гаряче" + out: "on" + - in: "нормально" + out: "off" + + bs_light_states: + values: + - in: "виявлено" + out: "on" + - in: "не виявлено" + out: "off" + + bs_lock_states: + values: + - in: "відкрито" + out: "on" + - in: "закрито" + out: "off" + + bs_moisture_states: + values: + - in: "волого" + out: "on" + - in: "сухо" + out: "off" + + bs_motion_states: + values: + - in: "виявлено" + out: "on" + - in: "чисто" + out: "off" + + bs_occupancy_states: + values: + - in: "виявлено" + out: "on" + - in: "чисто" + out: "off" + + bs_opening_states: + values: + - in: "відкрито" + out: "on" + - in: "закрито" + out: "off" + + bs_plug_states: + values: + - in: "під'єднано" + out: "on" + - in: "від'єднано" + out: "off" + + bs_power_states: + values: + - in: "(увімкнено|виявлено)" + out: "on" + - in: "(вимкнено|не виявлено)" + out: "off" + + bs_presence_states: + values: + - in: "(вдома|виявлено)" + out: "on" + - in: "(не вдома|не виявлено)" + out: "off" + + bs_problem_states: + values: + - in: "виявлено" + out: "on" + - in: "все добре" + out: "off" + + bs_running_states: + values: + - in: "запущено" + out: "on" + - in: "не запущено" + out: "off" + + bs_safety_states: + values: + - in: "небезпечно" + out: "on" + - in: "безпечно" + out: "off" + + bs_smoke_states: + values: + - in: "виявлено" + out: "on" + - in: "чисто" + out: "off" + + bs_sound_states: + values: + - in: "виявлено" + out: "on" + - in: "чисто" + out: "off" + + bs_tamper_states: + values: + - in: "виявлено" + out: "on" + - in: "чисто" + out: "off" + + bs_update_states: + values: + - in: "має оновлення" + out: "on" + - in: "(оновлено|остання версія)" + out: "off" + + bs_vibration_states: + values: + - in: "(виявлено|вібрує|вібрація)" + out: "on" + - in: "(чисто|не вібрує|нема вібрації)" + out: "off" + + bs_window_states: + values: + - in: "відкрито" + out: "on" + - in: "закрито" + out: "closed" + shopping_list_item: wildcard: true diff --git a/shared/__init__.py b/shared/__init__.py index ddf34ea68b..1f1cd15c3a 100644 --- a/shared/__init__.py +++ b/shared/__init__.py @@ -1,4 +1,5 @@ from dataclasses import dataclass, field +from functools import partial from typing import Any, Dict, Optional, List, Set, Tuple from hassil import parse_sentence @@ -60,6 +61,9 @@ def get_matched_states( if result.intent.name in ("HassClimateGetTemperature", "HassClimateSetTemperature"): # Match climate entities only states = [state for state in states if state.domain == "climate"] + elif result.intent.name in ("HassGetWeather",): + # Match weather entities only + states = [state for state in states if state.domain == "weather"] # Implement some matching logic from Home Assistant entity_name: Optional[str] = None @@ -177,11 +181,25 @@ def render_response( for entity in result.entities_list }, "state": state1, - "query": {"matched": matched, "unmatched": unmatched, "total_results": len(matched) + len(unmatched)}, + "query": { + "matched": matched, + "unmatched": unmatched, + "total_results": len(matched) + len(unmatched), + }, + "state_attr": partial(state_attr, matched), } ) +def state_attr(states: List[State], entity_id: str, attr_name: str) -> Any | None: + """Mimic state_attr from Home Assistant.""" + for state in states: + if state.entity_id == entity_id: + return state.attributes.get(attr_name) + + return None + + def get_slot_lists(fixtures: dict[str, Any]) -> dict[str, SlotList]: # Load test areas and entities for language slot_lists: dict[str, SlotList] = {} diff --git a/tests/ar/_fixtures.yaml b/tests/ar/_fixtures.yaml index bcb2766882..f7778b44ce 100644 --- a/tests/ar/_fixtures.yaml +++ b/tests/ar/_fixtures.yaml @@ -213,16 +213,16 @@ entities: - name: منظم الحراره id: "climate.reception_thermostat" area: "reception" - state: "22" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 22 - name: منظم حرارة غرفة المعيشة id: "climate.living_room_thermostat" area: "living_room" - state: "22" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 22 # SENSORS - name: درجة الحرارة الخارجية diff --git a/tests/ar/climate_HassClimateGetTemperature.yaml b/tests/ar/climate_HassClimateGetTemperature.yaml index b01710b68d..58d2df507a 100644 --- a/tests/ar/climate_HassClimateGetTemperature.yaml +++ b/tests/ar/climate_HassClimateGetTemperature.yaml @@ -5,7 +5,7 @@ tests: - "ماذا تكون درجة الحرارة" intent: name: HassClimateGetTemperature - response: "22 °C" + response: "22" - sentences: - "ما هي درجة حرارة غرفة المعيشة" @@ -15,7 +15,7 @@ tests: name: HassClimateGetTemperature slots: area: غرفة المعيشة - response: "22 °C" + response: "22" - sentences: - "كم هي دافئة في غرفة المعيشة" @@ -24,4 +24,4 @@ tests: name: HassClimateGetTemperature slots: area: غرفة المعيشة - response: "22 °C" + response: "22" diff --git a/tests/ar/homeassistant_HassGetState.yaml b/tests/ar/homeassistant_HassGetState.yaml index 79ded0fdc9..706415010d 100644 --- a/tests/ar/homeassistant_HassGetState.yaml +++ b/tests/ar/homeassistant_HassGetState.yaml @@ -22,7 +22,7 @@ tests: name: HassGetState slots: name: "منظم حرارة غرفة المعيشة" - response: "حالة منظم حرارة غرفة المعيشة هي 22 °C" + response: "حالة منظم حرارة غرفة المعيشة هي heat" - sentences: - "ما هي حالة منظم الحراره في غرفة استقبال الضيوف" @@ -31,7 +31,7 @@ tests: slots: name: "منظم الحراره" area: "غرفة استقبال الضيوف" - response: "حالة منظم الحراره هي 22 °C" + response: "حالة منظم الحراره هي heat" - sentences: - "ما هي حالة ستارة غرفة النوم" diff --git a/tests/cs/_fixtures.yaml b/tests/cs/_fixtures.yaml index 509db18728..e5dd6efc7f 100644 --- a/tests/cs/_fixtures.yaml +++ b/tests/cs/_fixtures.yaml @@ -84,3 +84,12 @@ entities: attributes: device_class: garage domain: cover + + - name: "Párty" + id: "scene.party" + attributes: + domain: scene + + - name: "Ovoce a zelenina" + id: "todo.ovoce_a_zelenina" + state: "" diff --git a/tests/cs/light_HassTurnOff.yaml b/tests/cs/light_HassTurnOff.yaml index 896fbb7425..8b0d74bac6 100644 --- a/tests/cs/light_HassTurnOff.yaml +++ b/tests/cs/light_HassTurnOff.yaml @@ -5,6 +5,7 @@ tests: - "vypnout světla v kuchyni" - "zhasni všechna světla v kuchyni" - "zhasni světla v kuchyni" + - "zhasni v kuchyni" intent: name: HassTurnOff slots: @@ -41,7 +42,6 @@ tests: name: HassTurnOff slots: domain: light - area: all name: all response: - "Všechna světla byla zhasnuta" diff --git a/tests/cs/light_HassTurnOn.yaml b/tests/cs/light_HassTurnOn.yaml index 31812d7d82..1c13ed8282 100644 --- a/tests/cs/light_HassTurnOn.yaml +++ b/tests/cs/light_HassTurnOn.yaml @@ -2,7 +2,9 @@ language: cs tests: - sentences: - "rozsviť světlo lampička v obývacím pokoji" + - "rozsviť lampičku v obývacím pokoji" - "zapni světlo lampička v obývacím pokoji" + - "zapni lampičku v obývacím pokoji" intent: name: HassTurnOn slots: @@ -14,10 +16,10 @@ tests: response: "Rozsvíceno" - sentences: + - "zapni předsíň" - "předsíň rozsviť" - "rozsviť předsíň" - "zapni světlo předsíň" - - "světlo předsíň zapni" intent: name: HassTurnOn slots: @@ -29,6 +31,8 @@ tests: - "zapni všechna světla v obývacím pokoji" - "zapni světla v obýváku" - "v obývacím pokoji zapni všechna světla" + - "rozsviť v obývacím pokoji" + - "rozsviť světla v obývacím pokoji" intent: name: HassTurnOn slots: diff --git a/tests/cs/scene_HassTurnOn.yaml b/tests/cs/scene_HassTurnOn.yaml new file mode 100644 index 0000000000..ad44b09119 --- /dev/null +++ b/tests/cs/scene_HassTurnOn.yaml @@ -0,0 +1,33 @@ +language: cs +tests: + - sentences: + - "aktivuj scénu párty" + - "zapni scénu párty" + - "přejdi na scénu párty" + - "změň scénu na párty" + intent: + name: HassTurnOn + slots: + domain: scene + name: "Párty" + response: "Scéna aktivována" + - sentences: + - "aktivuj scénu párty v Kuchyni" + - "aktivuj párty v Kuchyni" + - "zapni scénu párty v Kuchyni" + - "aktivuj v Kuchyni scénu párty" + - "zapni v Kuchyni scénu párty" + - "změň v Kuchyni scénu na párty" + - "přejdi v Kuchyni na scénu párty" + - "změň scénu v Kuchyni na párty" + - "přejdi na scénu párty v Kuchyni" + intent: + name: HassTurnOn + slots: + area: + - Kuchyň + - Kuchyně + - Kuchyni + domain: scene + name: "Párty" + response: "Scéna aktivována" diff --git a/tests/cs/todo_HassListAddItem.yaml b/tests/cs/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..4d99ffae79 --- /dev/null +++ b/tests/cs/todo_HassListAddItem.yaml @@ -0,0 +1,14 @@ +language: cs +tests: + - sentences: + - přidej jahody mražený na seznam ovoce a zelenina + - přidej jahody mražený do seznamu ovoce a zelenina + - připiš jahody mražený do seznamu ovoce a zelenina + - přidej jahody mražený na ovoce a zelenina + - dej jahody mražený do ovoce a zelenina + intent: + name: HassListAddItem + slots: + item: "jahody mražený " + name: "Ovoce a zelenina" + response: "Přidáno: jahody mražený" diff --git a/tests/de/_fixtures.yaml b/tests/de/_fixtures.yaml index 9fd2ae78ed..1ecc5d5244 100644 --- a/tests/de/_fixtures.yaml +++ b/tests/de/_fixtures.yaml @@ -47,15 +47,15 @@ entities: - name: Wohnzimmerthermostat id: climate.living_room area: living_room - state: "22" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 22 - name: Küchenthermostat id: climate.kitchen area: kitchen - state: "24" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 24 - name: "Vorhang links" id: "cover.wohnzimmer_vorhang_links" area: living_room @@ -174,3 +174,21 @@ entities: out: "on" attributes: device_class: heat + + - name: "Haushalt" + id: "todo.haushalt" + state: "" + + - name: "Berlin" + id: "weather.berlin" + state: "rainy" + attributes: + temperature: "8" + temperature_unit: "°C" + + - name: "Los Angeles" + id: "weather.los_angeles" + state: "clear" + attributes: + temperature: "25" + temperature_unit: "°C" diff --git a/tests/de/climate_HassClimateGetTemperature.yaml b/tests/de/climate_HassClimateGetTemperature.yaml index 99f9b8b7b2..0e687a1286 100644 --- a/tests/de/climate_HassClimateGetTemperature.yaml +++ b/tests/de/climate_HassClimateGetTemperature.yaml @@ -15,7 +15,7 @@ tests: name: HassClimateGetTemperature slots: area: Wohnzimmer - response: "22 °C" + response: "22" - sentences: - Wie hoch ist die Temperatur der Küche? @@ -23,13 +23,13 @@ tests: name: HassClimateGetTemperature slots: area: Küche - response: "24 °C" + response: "24" - sentences: - Wie hoch ist die Temperatur? intent: name: HassClimateGetTemperature - response: "22 °C" + response: "22" - sentences: - Wie hoch ist die Temperatur von dem Wohnzimmerthermostat? @@ -40,7 +40,7 @@ tests: name: HassClimateGetTemperature slots: name: Wohnzimmerthermostat - response: "22 °C" + response: "22" - sentences: - Wie hoch ist die Temperatur von dem Thermostat im Wohnzimmer? @@ -51,4 +51,4 @@ tests: name: HassClimateGetTemperature slots: area: Wohnzimmer - response: "22 °C" + response: "22" diff --git a/tests/de/todo_HassListAddItem.yaml b/tests/de/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..4161c7588a --- /dev/null +++ b/tests/de/todo_HassListAddItem.yaml @@ -0,0 +1,24 @@ +language: de +tests: + - sentences: + - "Putzen auf die Liste Haushalt setzen" + - "Putzen auf die Liste Haushalt schreiben" + - "Putzen in die Liste Haushalt schreiben" + - "Putzen auf die Liste Haushalt nehmen" + - "setze Putzen auf die Liste Haushalt" + - "schreibe Putzen auf die Liste Haushalt" + - "schreibe Putzen in die Liste Haushalt" + - "nehme Putzen auf die Liste Haushalt" + - "Putzen auf die Liste Haushalt" + - "Putzen in meine Liste Haushalt" + - "Putzen meiner Liste Haushalt hinzufügen" + - "Putzen zu meiner Liste Haushalt hinzufügen" + - "füge Putzen zu meiner Liste Haushalt hinzu" + - "füge Putzen meiner Liste Haushalt hinzu" + - "füge zu meiner Liste Haushalt Putzen hinzu" + intent: + name: HassListAddItem + slots: + item: "putzen " + name: "Haushalt" + response: putzen hinzugefügt diff --git a/tests/de/weather_HassGetWeather.yaml b/tests/de/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..6999ac2b24 --- /dev/null +++ b/tests/de/weather_HassGetWeather.yaml @@ -0,0 +1,22 @@ +language: de +tests: + - sentences: + - "wie ist das Wetter in Berlin?" + - "wie ist das Wetter für Berlin?" + - "was für ein Wetter ist in Berlin?" + - "was für Wetter hat es in Berlin?" + - "wie ist das Berliner Wetter?" + - "wie ist Berlins Wetter?" + intent: + name: HassGetWeather + slots: + name: Berlin + response: 8 °C und regnerisch + + - sentences: + - "wie ist das Los Angeles Wetter?" + intent: + name: HassGetWeather + slots: + name: Los Angeles + response: 25 °C und klar diff --git a/tests/en/_fixtures.yaml b/tests/en/_fixtures.yaml index 2d58adb2be..cd92ba47a1 100644 --- a/tests/en/_fixtures.yaml +++ b/tests/en/_fixtures.yaml @@ -14,6 +14,9 @@ areas: - name: "Entrance" id: "entrance" + + - name: "Office" + id: "office" entities: - name: "Bedroom Lamp" id: "light.bedroom_lamp" @@ -96,9 +99,16 @@ entities: - name: "Thermostat" id: "climate.thermostat" area: "living_room" - state: "68" + state: "heat" attributes: - unit_of_measurement: "°F" + current_temperature: 68 + + - name: "Office Thermostat" + id: "climate.office_thermostat" + area: "office" + state: "heat" + attributes: + current_temperature: 1 - name: "Front Door" id: "lock.front_door" diff --git a/tests/en/climate_HassClimateGetTemperature.yaml b/tests/en/climate_HassClimateGetTemperature.yaml index ff192f6f5a..ced9875119 100644 --- a/tests/en/climate_HassClimateGetTemperature.yaml +++ b/tests/en/climate_HassClimateGetTemperature.yaml @@ -7,7 +7,7 @@ tests: - "what is the temp?" intent: name: HassClimateGetTemperature - response: "68 °F" + response: "68 degrees" - sentences: - "what is the temperature in the living room?" @@ -21,4 +21,14 @@ tests: name: HassClimateGetTemperature slots: area: Living Room - response: "68 °F" + response: "68 degrees" + + - sentences: + - "what is the temperature of the office thermostat?" + - "what's the office thermostat temperature?" + - "how hot is the office thermostat?" + intent: + name: HassClimateGetTemperature + slots: + name: Office Thermostat + response: "1 degree" diff --git a/tests/en/light_HassTurnOff.yaml b/tests/en/light_HassTurnOff.yaml index 787c7f3d73..6c7d03cbe5 100644 --- a/tests/en/light_HassTurnOff.yaml +++ b/tests/en/light_HassTurnOff.yaml @@ -41,14 +41,15 @@ tests: name: all - sentences: - - "turn off all the lights" - - "turn off all the lights in here" - - "turn all the lights in here off" - - "turn all the lights off here" + - "turn off the lights" + - "turn off the lights in here" + - "turn the lights in here off" + - "turn the lights off here" intent: name: HassTurnOff context: area: Living Room slots: domain: light + area: Living Room response: "Turned off lights" diff --git a/tests/en/light_HassTurnOn.yaml b/tests/en/light_HassTurnOn.yaml index c1b83d25a1..6196a2714c 100644 --- a/tests/en/light_HassTurnOn.yaml +++ b/tests/en/light_HassTurnOn.yaml @@ -32,14 +32,15 @@ tests: response: "Turned on lights" - sentences: - - "turn on all the lights" - - "turn on all the lights in here" - - "turn all the lights in here on" - - "turn all the lights on here" + - "turn on the lights" + - "turn on the lights in here" + - "turn the lights in here on" + - "turn the lights on here" intent: name: HassTurnOn context: area: Living Room slots: domain: light + area: Living Room response: "Turned on lights" diff --git a/tests/en/weather_HassGetWeather.yaml b/tests/en/weather_HassGetWeather.yaml index f8c3b3e192..874e34acb4 100644 --- a/tests/en/weather_HassGetWeather.yaml +++ b/tests/en/weather_HassGetWeather.yaml @@ -1,5 +1,12 @@ language: en tests: + - sentences: + - "what's the weather?" + - "what is the weather like" + intent: + name: HassGetWeather + response: 47 °F and raining + - sentences: - "what's the weather like in london?" - "what is the weather in London like" diff --git a/tests/es/_fixtures.yaml b/tests/es/_fixtures.yaml index 9f15fb23c8..59e6a2767f 100644 --- a/tests/es/_fixtures.yaml +++ b/tests/es/_fixtures.yaml @@ -117,16 +117,18 @@ entities: - name: Termostato salon id: climate.termostato_salon area: salon - state: "22" + state: "off" attributes: unit_of_measurement: "°C" + current_temperature: 22 - name: Termostato cocina id: climate.termostato_cocina area: cocina - state: "24" + state: "heat" attributes: unit_of_measurement: "°C" + current_temperature: 24 - name: Luz de garaje id: light.luz_garaje diff --git a/tests/es/climate_HassClimateGetTemperature.yaml b/tests/es/climate_HassClimateGetTemperature.yaml index f9ab26be3c..26458cc465 100644 --- a/tests/es/climate_HassClimateGetTemperature.yaml +++ b/tests/es/climate_HassClimateGetTemperature.yaml @@ -26,3 +26,13 @@ tests: slots: area: Cocina response: "24.0 grados" + + - sentences: + - "¿cuál es la temperatura del termostato cocina?" + - "¿a cuántos grados está el termostato cocina?" + - "¿a qué temperatura está el termostato cocina?" + intent: + name: HassClimateGetTemperature + slots: + name: Termostato cocina + response: "24.0 grados" diff --git a/tests/es/light_HassTurnOff.yaml b/tests/es/light_HassTurnOff.yaml index 4f7555fe74..7aac94de77 100644 --- a/tests/es/light_HassTurnOff.yaml +++ b/tests/es/light_HassTurnOff.yaml @@ -36,12 +36,14 @@ tests: - sentences: - "apaga la luz" + - "apaga las luces" - "apaga las luces de aquí" - - "apaga todas las luces aquí" + - "desconecta todas las luces aquí" intent: name: HassTurnOff context: area: Salón slots: domain: light + area: Salón response: "Luces apagadas" diff --git a/tests/es/light_HassTurnOn.yaml b/tests/es/light_HassTurnOn.yaml index f6fbf698b7..74932a61e0 100644 --- a/tests/es/light_HassTurnOn.yaml +++ b/tests/es/light_HassTurnOn.yaml @@ -36,7 +36,7 @@ tests: response: Luces encendidas - sentences: - - prender las luces + - enciende la luz - enciende todas las luces de aquí - podrías encender la luz - conecta las luces @@ -47,4 +47,5 @@ tests: area: Salón slots: domain: light + area: Salón response: Luces encendidas diff --git a/tests/es/weather_HassGetWeather.yaml b/tests/es/weather_HassGetWeather.yaml index ab5cd2416c..c3b8b6d0aa 100644 --- a/tests/es/weather_HassGetWeather.yaml +++ b/tests/es/weather_HassGetWeather.yaml @@ -1,5 +1,11 @@ language: es tests: + - sentences: + - "qué tiempo hace" + intent: + name: HassGetWeather + response: Lluvia, con una temperatura de 18 °C + - sentences: - "qué tiempo hace en Madrid" intent: diff --git a/tests/et/homeassistant_HassTurnOff.yaml b/tests/et/homeassistant_HassTurnOff.yaml index 8962e79a6b..d1d1311679 100644 --- a/tests/et/homeassistant_HassTurnOff.yaml +++ b/tests/et/homeassistant_HassTurnOff.yaml @@ -6,4 +6,4 @@ tests: name: HassTurnOff slots: name: "Elutoa lamp" - response: "Turned off elutoa lamp" + response: "elutoa lamp lülitatud välja" diff --git a/tests/et/homeassistant_HassTurnOn.yaml b/tests/et/homeassistant_HassTurnOn.yaml index 61f2b5c1d1..64f8855f60 100644 --- a/tests/et/homeassistant_HassTurnOn.yaml +++ b/tests/et/homeassistant_HassTurnOn.yaml @@ -6,4 +6,4 @@ tests: name: HassTurnOn slots: name: "Elutoa lamp" - response: "Turned on elutoa lamp" + response: "elutoa lamp lülitatud sisse" diff --git a/tests/fi/_fixtures.yaml b/tests/fi/_fixtures.yaml index 391ce0158b..fecffd6621 100644 --- a/tests/fi/_fixtures.yaml +++ b/tests/fi/_fixtures.yaml @@ -125,9 +125,9 @@ entities: - name: "Termostaatti" id: "climate.thermostat" area: "living_room" - state: "20" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 20 - name: "Etuovi" id: "lock.front_door" diff --git a/tests/fi/climate_HassClimateGetTemperature.yaml b/tests/fi/climate_HassClimateGetTemperature.yaml index 27e7e80b20..b3fe7f3c56 100644 --- a/tests/fi/climate_HassClimateGetTemperature.yaml +++ b/tests/fi/climate_HassClimateGetTemperature.yaml @@ -27,7 +27,7 @@ tests: - "tällä hetkellä miten kylmän tuntuista on" intent: name: "HassClimateGetTemperature" - response: "20 °C" + response: "20" - sentences: - "kerro paikan olohuone lämpö" @@ -128,4 +128,4 @@ tests: name: HassClimateGetTemperature slots: area: Olohuone - response: "20 °C" + response: "20" diff --git a/tests/fr/_fixtures.yaml b/tests/fr/_fixtures.yaml index 95bed24f2c..0f665cf726 100644 --- a/tests/fr/_fixtures.yaml +++ b/tests/fr/_fixtures.yaml @@ -79,7 +79,9 @@ entities: - name: "thermostat du salon" id: "climate.living_room" area: "living_room" - state: "21" + state: "heat" + attributes: + current_temperature: 21 - name: "température extérieure" id: "sensor.temperature_exterieure" @@ -393,3 +395,360 @@ entities: out: "on" attributes: device_class: window + + # https://www.home-assistant.io/integrations/sensor/ + - name: "sèche-linge" + id: "sensor.appliance_apparent_power" + state: "2" + attributes: + device_class: apparent_power + unit_of_measurement: "VA" + + - name: "capteur AQI" + id: "sensor.kitchen_aqi_sensor" + state: "50" + attributes: + device_class: aqi + + - name: "Capteur de pression extérieur" + id: "sensor.capteur_de_pression_exterieur" + state: "1000" + attributes: + device_class: atmospheric_pressure + unit_of_measurement: "hPa" + + - name: "Mon tel" + id: "sensor.mon_tel" + state: "98" + attributes: + device_class: battery + unit_of_measurement: "%" + + - name: "Capteur de CO2 pompe à chaleur" + id: "sensor.capteur_de_CO2 pompe_a_chaleur" + state: "50" + attributes: + device_class: carbon_dioxide + unit_of_measurement: "ppm" + + - name: "Capteur de monoxyde du garage" + id: "sensor.capteur_de_monoxyde_du_garage" + state: "48" + attributes: + device_class: carbon_monoxide + unit_of_measurement: "ppm" + + - name: "Compteur électrique" + id: "sensor.compteur_electrique" + state: "19" + attributes: + device_class: current + unit_of_measurement: "A" + + - name: "Routeur" + id: "sensor.routeur" + state: "22.9" + attributes: + device_class: data_rate + unit_of_measurement: "MB/s" + + - name: "Journal" + id: "sensor.journal" + state: "106" + attributes: + device_class: data_size + unit_of_measurement: "kB" + + - name: "Prochain anniversaire" + id: "sensor.prochain_anniversaire" + state: "2024-04-01" + attributes: + device_class: date + + - name: "voiture" + id: "sensor.car_mileage" + state: "65536" + attributes: + device_class: distance + unit_of_measurement: "km" + + - name: "Programme machine en cours" + id: "sensor.programme_machine_en_cours" + state: "64" + attributes: + device_class: duration + unit_of_measurement: "min" + + - name: "Panneaux solaires" + id: "sensor.panneaux_solaires" + state: "3.2" + attributes: + device_class: energy + unit_of_measurement: "kWh" + + - name: "Batteries panneaux" + id: "sensor.batteries_panneaux" + state: "6" + attributes: + device_class: energy_storage + unit_of_measurement: "kWh" + + - name: "Routeur wifi" + id: "sensor.router_wifi" + state: "5" + attributes: + device_class: frequency + unit_of_measurement: "Ghz" + + - name: "Consommation de gaz mensuelle" + id: "sensor.consommation_de_gaz_mensuelle" + state: "12" + attributes: + device_class: gas + unit_of_measurement: "m³" + + - name: "capteur d'humidité" + id: "sensor.capteur_humidite_de_la_chambre" + state: "48" + area: bedroom + attributes: + device_class: humidity + unit_of_measurement: "%" + + - name: "capteur luminosité" + id: "sensor.capteur_luminosite" + state: "438" + area: living_room + attributes: + device_class: illuminance + unit_of_measurement: "lux" + + - name: "Chauffage bébé" + id: "sensor.living_room_heater_irradiance" + state: "155" + attributes: + device_class: irradiance + unit_of_measurement: "W/m²" + + - name: "capteur jardinière" + id: "sensor.capteur_jardiniere" + state: "83" + attributes: + device_class: moisture + unit_of_measurement: "%" + + - name: "prix au kilowatt" + id: "sensor.prix_au_kilowatt" + state: "1" + attributes: + device_class: monetary + unit_of_measurement: "EUR" + + - name: "capteur NO2" + id: "sensor.capteur_no2" + state: "50" + attributes: + device_class: nitrogen_dioxide + unit_of_measurement: "µg/m³" + + - name: "capteur NO" + id: "sensor.capteur_no" + state: "50" + attributes: + device_class: nitrogen_monoxide + unit_of_measurement: "µg/m³" + + - name: "capteur N2O" + id: "sensor.capteur_n2o" + state: "50" + attributes: + device_class: nitrous_oxide + unit_of_measurement: "µg/m³" + + - name: "capteur ozone" + id: "sensor.living_room_ozone" + state: "50" + attributes: + device_class: ozone + unit_of_measurement: "µg/m³" + + - name: "capteur PM1" + id: "sensor.living_room_pm1" + state: "50" + attributes: + device_class: pm1 + unit_of_measurement: "µg/m³" + + - name: "capteur PM2.5" + id: "sensor.capteur_pm25" + state: "50" + attributes: + device_class: pm25 + unit_of_measurement: "µg/m³" + + - name: "capteur PM10" + id: "sensor.capteur_PM10" + state: "50" + attributes: + device_class: pm10 + unit_of_measurement: "µg/m³" + + - name: "puissance prise murale" + id: "sensor.puissance_prise_murale" + state: "2" + attributes: + device_class: power_factor + + - name: "watts air conditionné" + id: "sensor.aircon_power" + state: "380" + attributes: + device_class: power + unit_of_measurement: "W" + + - name: "pluviomètre" + id: "sensor.pluviometre" + state: "29" + attributes: + device_class: precipitation + unit_of_measurement: "mm" + + - name: "pluviomètre" + id: "sensor.pluviomètre_intensité" + state: "144" + attributes: + device_class: precipitation_intensity + unit_of_measurement: "mm/h" + + - name: "pression pneus" + id: "sensor.pression_pneus" + state: "2.1" + attributes: + device_class: pressure + unit_of_measurement: "bar" + + - name: "pompe" + id: "sensor.pompe_puissance_reactive" + state: "22" + attributes: + device_class: reactive_power + unit_of_measurement: "VAR" + + - name: "téléphone" + id: "sensor.telephone_force_signal" + state: "-43" + attributes: + device_class: signal_strength + unit_of_measurement: "dBm" + + - name: "barre de son" + id: "sensor.barre_de_son" + state: "62" + attributes: + device_class: sound_pressure + unit_of_measurement: "dB" + + - name: "voiture de madame" + id: "sensor.voiture_de_madame_vitesse" + state: "67" + attributes: + device_class: speed + unit_of_measurement: "km/h" + + - name: "pompe à chaleur" + id: "sensor.pompe_a_chaleur_so2" + state: "50" + attributes: + device_class: sulphur_dioxide + unit_of_measurement: "µg/m³" + + - name: "sonde salon" + id: "sensor.sonde_salon_temperature" + state: "19" + attributes: + device_class: temperature + unit_of_measurement: "°C" + + - name: "capteur VOC cuisine" + id: "sensor.capteur_voc_cuisine" + state: "35" + attributes: + device_class: volatile_organic_compounds + unit_of_measurement: "µg/m³" + + - name: "capteur VOC cuisine" + id: "sensor.capteur_voc_cuisine_particules" + state: "35" + attributes: + device_class: volatile_organic_compounds_parts + unit_of_measurement: "ppm" + + - name: "voltage chaudière" + id: "sensor.voltage_chaudière" + state: "12" + attributes: + device_class: voltage + unit_of_measurement: "V" + + - name: "total pompe quotidien" + id: "sensor.pompe_quotidien" + state: "1356" + attributes: + device_class: volume + unit_of_measurement: "L" + + - name: "tampon pompe" + id: "sensor.tampn_pompe" + state: "28" + attributes: + device_class: volume_storage + unit_of_measurement: "L" + + - name: "pompe à eau" + id: "sensor.pompe_a_eau" + state: "5987" + attributes: + device_class: water + unit_of_measurement: "L" + + - name: "capteur lit" + id: "sensor.bed_sensor_weight" + state: "87" + attributes: + device_class: weight + unit_of_measurement: "kg" + + - name: "Mistral" + id: "sensor.mistral_speed" + state: "33" + attributes: + device_class: wind_speed + unit_of_measurement: "km/h" + + - name: "Paris" + id: "weather.paris" + state: "rainy" + attributes: + temperature: "10" + temperature_unit: "°C" + + - name: "Brest" + id: "weather.brest" + state: "sunny" + attributes: + temperature: "25" + temperature_unit: "°C" + + - name: "Joseph" + id: "person.jospeh" + state: "maison" + - name: "Ada" + id: "person.ada" + state: "bureau" + - name: "John" + id: "person.john" + state: "absent" + + - name: "tâches" + id: "todo.taches" + state: "" diff --git a/tests/fr/homeassistant_HassNevermind.yaml b/tests/fr/homeassistant_HassNevermind.yaml new file mode 100644 index 0000000000..95f6dafa18 --- /dev/null +++ b/tests/fr/homeassistant_HassNevermind.yaml @@ -0,0 +1,7 @@ +language: fr +tests: + - sentences: + - "oublie" + - "annule" + intent: + name: HassNevermind diff --git a/tests/fr/person_HassGetState.yaml b/tests/fr/person_HassGetState.yaml new file mode 100644 index 0000000000..616c9239b7 --- /dev/null +++ b/tests/fr/person_HassGetState.yaml @@ -0,0 +1,65 @@ +language: fr +tests: + - sentences: + - "Où est Joseph ?" + intent: + name: HassGetState + slots: + domain: person + name: Joseph + response: "Joseph est dans la zone maison" + + - sentences: + - "Où est Ada" + intent: + name: HassGetState + slots: + domain: person + name: Ada + response: "Ada est dans la zone bureau" + + - sentences: + - "Ada est-elle à la maison" + intent: + name: HassGetState + slots: + domain: person + name: Ada + state: maison + response: "Non, bureau" + + - sentences: + - "Y a-t-il quelqu'un à la maison" + intent: + name: HassGetState + slots: + domain: person + state: maison + response: "Oui, Joseph" + + - sentences: + - "Tout le monde est-il à la maison" + intent: + name: HassGetState + slots: + domain: person + state: maison + response: "Non, pas Ada et John" + + - sentences: + - "Qui est à la maison" + intent: + name: HassGetState + slots: + domain: person + state: maison + response: "Joseph" + + - sentences: + - "Combien de personnes sont à la maison" + intent: + name: HassGetState + slots: + domain: person + state: maison + response: "1" diff --git a/tests/fr/sensor_HassGetState.yaml b/tests/fr/sensor_HassGetState.yaml new file mode 100644 index 0000000000..15a67b1e6d --- /dev/null +++ b/tests/fr/sensor_HassGetState.yaml @@ -0,0 +1,528 @@ +language: fr +tests: + # Apparent power + - sentences: + - "Quelle est la puissance apparente du sèche-linge ?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: apparent_power + name: "sèche-linge" + response: "2 VA" + + # AQI + - sentences: + - "quelle est la qualité de l'air mesurée par le capteur AQI ?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: aqi + name: "capteur AQI" + response: "50" + + # # Atmospheric pressure + - sentences: + - "Quelle est la pression atmosphérique de capteur de pression extérieur" + - "Quelle est la pression atmosphérique renvoyée par le capteur de pression extérieur" + intent: + name: HassGetState + slots: + domain: sensor + device_class: atmospheric_pressure + name: "Capteur de pression extérieur" + response: "1000 hPa" + + # Battery + - sentences: + - "Quel est le niveau de batterie de mon tel" + - "Combien de batterie mon tel a-t-il" + intent: + name: HassGetState + slots: + domain: sensor + device_class: battery + name: "Mon tel" + response: "98 %" + + # CO2 + - sentences: + - "Quel est le niveau de dioxyde de carbone du capteur de CO2 pompe à chaleur" + - "Quel est le niveau de CO2 mesuré par le capteur de CO2 pompe à chaleur" + intent: + name: HassGetState + slots: + domain: sensor + device_class: carbon_dioxide + name: "Capteur de CO2 pompe à chaleur" + response: "50 ppm" + + # CO + - sentences: + - "Quel est le niveau de monoxyde de carbone du capteur de monoxyde du garage" + - "Quel est le niveau de CO mesuré par le capteur de monoxyde du garage" + intent: + name: HassGetState + slots: + domain: sensor + device_class: carbon_monoxide + name: "Capteur de monoxyde du garage" + response: "48 ppm" + + # Current + - sentences: + - "Quel est la quantité de courant électrique retournée par le compteur électrique?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: current + name: "Compteur électrique" + response: "19 A" + + # Data rate + - sentences: + - "Quelle est le débit du routeur" + intent: + name: HassGetState + slots: + domain: sensor + device_class: data_rate + name: "Routeur" + response: "22.9 MB/s" + + # Data size + - sentences: + - "Quelle est la taille du journal?" + - "Quel est le volume de données du journal?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: data_size + name: "Journal" + response: "106 kB" + + # Date + - sentences: + - "Quelle est la date de prochain anniversaire" + - "Quand est le prochain anniversaire" + intent: + name: HassGetState + slots: + domain: sensor + device_class: date + name: "Prochain anniversaire" + response: "2024-04-01" + + # Distance + - sentences: + - "Quelle est le kilométrage de la voiture?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: distance + name: "voiture" + response: "65536 km" + + # Duration + - sentences: + - "Quelle est la durée du programme machine en cours?" + - "Quelle est la durée restante du programme machine en cours?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: duration + name: "Programme machine en cours" + response: "64 min" + + # # Energy + - sentences: + - "Quelle est la quantité d'énergie produite par les panneaux solaires?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: energy + name: "Panneaux solaires" + response: "3.2 kWh" + + # Energy storage + - sentences: + - "Quelle est la quantité d'énergie stockée par les batteries panneaux?" + intent: + name: HassGetState + slots: + domain: sensor + device_class: energy_storage + name: "Batteries panneaux" + response: "6 kWh" + + # Frequency + - sentences: + - "Quelle est la fréquence du routeur wifi" + intent: + name: HassGetState + slots: + domain: sensor + device_class: frequency + name: "Routeur wifi" + response: "5 Ghz" + + # Gas + - sentences: + - "Quelle est le volume de gaz indiqué par la consommation de gaz mensuelle" + intent: + name: HassGetState + slots: + domain: sensor + device_class: gas + name: "Consommation de gaz mensuelle" + response: "12 m³" + + # Humidity + - sentences: + - "quel est le taux d'humidité indiqué par le capteur d'humidité dans la chambre" + intent: + name: HassGetState + slots: + area: chambre + domain: sensor + device_class: humidity + name: "capteur d'humidité" + response: "48 %" + + # Illuminance + - sentences: + - "Quel est le niveau de luminosité du capteur luminosité dans le salon" + intent: + name: HassGetState + slots: + area: salon + domain: sensor + device_class: illuminance + name: "capteur luminosité" + response: "438 lux" + + # Irradiance + - sentences: + - "Quelle est le niveau d'irradiation sur le chauffage bébé" + intent: + name: HassGetState + slots: + domain: sensor + device_class: irradiance + name: "Chauffage bébé" + response: "155 W/m²" + + # Moisture + - sentences: + - "Quel est le taux d'humidité du capteur jardinière" + intent: + name: HassGetState + slots: + domain: sensor + device_class: moisture + name: "capteur jardinière" + response: "83 %" + + # Monetary + - sentences: + - "Quel est le coût du prix au kilowatt" + intent: + name: HassGetState + slots: + domain: sensor + device_class: monetary + name: "prix au kilowatt" + response: "1 EUR" + + # Nitrogen dioxide + - sentences: + - "Quel est le niveau de dioxyde d'azote du capteur NO2" + intent: + name: HassGetState + slots: + domain: sensor + device_class: nitrogen_dioxide + name: "capteur NO2" + response: "50 µg/m³" + + # Nitrogen monoxide + - sentences: + - "Quel est le niveau de monoxyde d'azote du capteur NO" + intent: + name: HassGetState + slots: + domain: sensor + device_class: nitrogen_monoxide + name: "capteur NO" + response: "50 µg/m³" + + # Nitrogen oxide + - sentences: + - "Quel est la concentration de N2O du capteur N2O" + intent: + name: HassGetState + slots: + domain: sensor + device_class: nitrous_oxide + name: "capteur N2O" + response: "50 µg/m³" + + # Ozone + - sentences: + - "Quel est la concentration d'ozone renvoyée par le capteur ozone" + intent: + name: HassGetState + slots: + domain: sensor + device_class: ozone + name: "capteur ozone" + response: "50 µg/m³" + + # PM1 + - sentences: + - "Quel est le niveau de particules fines indiqué par le capteur PM1" + intent: + name: HassGetState + slots: + domain: sensor + device_class: pm1 + name: "capteur PM1" + response: "50 µg/m³" + + # PM2.5 + - sentences: + - "Quel est le niveau de particules fines indiqué par le capteur PM2.5" + intent: + name: HassGetState + slots: + domain: sensor + device_class: pm25 + name: "capteur PM2.5" + response: "50 µg/m³" + + # PM10 + - sentences: + - "Quel est le niveau de particules fines indiqué par le capteur PM10" + intent: + name: HassGetState + slots: + domain: sensor + device_class: pm10 + name: "capteur PM10" + response: "50 µg/m³" + + # Power factor + - sentences: + - "Quel est le facteur de puissance renvoyé par puissance prise murale" + intent: + name: HassGetState + slots: + domain: sensor + device_class: power_factor + name: "puissance prise murale" + response: "2" + + # Power + - sentences: + - "Quelle est la puissance de watts air conditionné" + intent: + name: HassGetState + slots: + domain: sensor + device_class: power + name: "watts air conditionné" + response: "380 W" + + # Precipitation + - sentences: + - "Quel est le niveau de précipitations mesuré par le pluviomètre" + - "Quelles sont les précipitations mesurées par le pluviomètre" + intent: + name: HassGetState + slots: + domain: sensor + device_class: precipitation + name: "pluviomètre" + response: "29 mm" + + # Precipitation intensity + - sentences: + - "Quelle est l'intensité de pluie renvoyée par le pluviomètre" + intent: + name: HassGetState + slots: + domain: sensor + device_class: precipitation_intensity + name: "pluviomètre" + response: "144 mm/h" + + # Pressure + - sentences: + - "Quelle est la pression indiquée par pression pneus" + intent: + name: HassGetState + slots: + domain: sensor + device_class: pressure + name: "pression pneus" + response: "2.1 bar" + + # Reactiv epower + - sentences: + - "Quelle est la puissance réactive de la pompe" + intent: + name: HassGetState + slots: + domain: sensor + device_class: reactive_power + name: "pompe" + response: "22 VAR" + + # Signal strength + - sentences: + - "Quelle est la force du signal du téléphone" + intent: + name: HassGetState + slots: + domain: sensor + device_class: signal_strength + name: "téléphone" + response: "-43 dBm" + + # Sound pressure + - sentences: + - "Quelle est la pression acoustique de la barre de son" + intent: + name: HassGetState + slots: + domain: sensor + device_class: sound_pressure + name: "barre de son" + response: "62 dB" + + # Speed + - sentences: + - "Quelle est la vitesse de la voiture de madame" + intent: + name: HassGetState + slots: + domain: sensor + device_class: speed + name: "voiture de madame" + response: "67 km/h" + + # Sulphur dioxide + - sentences: + - "Quel est la concentration de dioxyde de soufre de la pompe à chaleur" + intent: + name: HassGetState + slots: + domain: sensor + device_class: sulphur_dioxide + name: "pompe à chaleur" + response: "50 µg/m³" + + # Temperature + - sentences: + - "Quelle est la température mesurée par la sonde salon" + intent: + name: HassGetState + slots: + domain: sensor + device_class: temperature + name: "sonde salon" + response: "19 °C" + + # VOC + - sentences: + - "Quelle est la concentration de composés volatils donnée par le capteur VOC cuisine" + intent: + name: HassGetState + slots: + domain: sensor + device_class: volatile_organic_compounds + name: "capteur VOC cuisine" + response: "35 µg/m³" + + # # VOC in parts + - sentences: + - "Quel est le niveau de particules de composés volatils renvoyé par le capteur VOC cuisine" + intent: + name: HassGetState + slots: + domain: sensor + device_class: volatile_organic_compounds_parts + name: "capteur VOC cuisine" + response: "35 ppm" + + # Voltage + - sentences: + - "Quel est le voltage renvoyé par voltage chaudière" + intent: + name: HassGetState + slots: + domain: sensor + device_class: voltage + name: "voltage chaudière" + response: "12 V" + + # Volume + - sentences: + - "Quel est le volume de total pompe quotidien" + intent: + name: HassGetState + slots: + domain: sensor + device_class: volume + name: "total pompe quotidien" + response: "1356 L" + + # Volume storage + - sentences: + - "Quel est le volume total du tampon pompe" + intent: + name: HassGetState + slots: + domain: sensor + device_class: volume_storage + name: "tampon pompe" + response: "28 L" + + # Water + - sentences: + - "Quelle est la consommation d'eau de la pompe à eau" + intent: + name: HassGetState + slots: + domain: sensor + device_class: water + name: "pompe à eau" + response: "5987 L" + + # Weight + - sentences: + - "Quel est le poids donné par le capteur lit" + intent: + name: HassGetState + slots: + domain: sensor + device_class: weight + name: "capteur lit" + response: "87 kg" + + # Wind speed + - sentences: + - "Quelle est la vitesse du vent Mistral" + intent: + name: HassGetState + slots: + domain: sensor + device_class: wind_speed + name: "Mistral" + response: "33 km/h" diff --git a/tests/fr/todo_HassListAddItem.yaml b/tests/fr/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..1211a5573a --- /dev/null +++ b/tests/fr/todo_HassListAddItem.yaml @@ -0,0 +1,11 @@ +language: fr +tests: + - sentences: + - ajoute réparer le volet à tâches + - mets réparer le volet dans la liste de tâches + intent: + name: HassListAddItem + slots: + item: "réparer le volet " + name: "tâches" + response: réparer le volet ajouté diff --git a/tests/fr/weather_HassGetWeather.yaml b/tests/fr/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..eab081f3cd --- /dev/null +++ b/tests/fr/weather_HassGetWeather.yaml @@ -0,0 +1,18 @@ +language: fr +tests: + - sentences: + - "Quel temps fait-il à Paris" + - "Donne-moi la météo à Paris" + intent: + name: HassGetWeather + slots: + name: Paris + response: 10 °C et de la pluie + + - sentences: + - "Quel temps fait-il à Brest" + intent: + name: HassGetWeather + slots: + name: Brest + response: 25 °C et un temps ensoleillé diff --git a/tests/hr/_fixtures.yaml b/tests/hr/_fixtures.yaml index 3a5d12d467..106cb4690a 100644 --- a/tests/hr/_fixtures.yaml +++ b/tests/hr/_fixtures.yaml @@ -144,16 +144,16 @@ entities: - name: "Radijator" id: "climate.trv_living_room" area: "living_room" - state: "21" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 21 - name: "Radijator" id: "climate.trv_kitchen" area: "kitchen" - state: "22" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 22 - name: "vani|vanjska" id: "sensor.outside_temperature" diff --git a/tests/hr/climate_HassClimateGetTemperature.yaml b/tests/hr/climate_HassClimateGetTemperature.yaml index 97d5571794..ce303623f6 100644 --- a/tests/hr/climate_HassClimateGetTemperature.yaml +++ b/tests/hr/climate_HassClimateGetTemperature.yaml @@ -5,7 +5,7 @@ tests: - reci mi temperaturu? intent: name: HassClimateGetTemperature - response: "21 °C" + response: "21" - sentences: - koja je temperatura u dnevnoj sobi? @@ -16,7 +16,7 @@ tests: area: - dnevna soba - dnevnoj sobi - response: "21 °C" + response: "21" - sentences: - kakva je kuhinjska temperatura? @@ -27,4 +27,4 @@ tests: area: - kuhinji - kuhinjska - response: "22 °C" + response: "22" diff --git a/tests/is/_fixtures.yaml b/tests/is/_fixtures.yaml index c927a45ff9..438e661921 100644 --- a/tests/is/_fixtures.yaml +++ b/tests/is/_fixtures.yaml @@ -90,6 +90,6 @@ entities: - name: "Hitamælir" id: "climate.thermostat" area: "living_room" - state: "21" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 21 diff --git a/tests/is/climate_HassClimateGetTemperature.yaml b/tests/is/climate_HassClimateGetTemperature.yaml index f7e7e74df3..edaa13a31c 100644 --- a/tests/is/climate_HassClimateGetTemperature.yaml +++ b/tests/is/climate_HassClimateGetTemperature.yaml @@ -7,7 +7,7 @@ tests: - "hversu heitt er núna?" intent: name: HassClimateGetTemperature - response: "Hitinn er 21 °C" + response: "Hitinn er 21" - sentences: - "Hver er hitinn í stofunni?" @@ -20,4 +20,4 @@ tests: name: HassClimateGetTemperature slots: area: Stofu - response: "Hitinn er 21 °C" + response: "Hitinn er 21" diff --git a/tests/ko/_fixtures.yaml b/tests/ko/_fixtures.yaml index 844b318e05..cf7a38e658 100644 --- a/tests/ko/_fixtures.yaml +++ b/tests/ko/_fixtures.yaml @@ -103,9 +103,9 @@ entities: - name: "(온도 조절기|온도 조절 장치|난방 제어기)" id: "climate.thermostat" area: "living_room" - state: "20" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 20 - name: "(대문|현관문|현관|출입문)" id: "lock.front_door" diff --git a/tests/ko/climate_HassClimateGetTemperature.yaml b/tests/ko/climate_HassClimateGetTemperature.yaml index 4de6d8f879..a4787053dd 100644 --- a/tests/ko/climate_HassClimateGetTemperature.yaml +++ b/tests/ko/climate_HassClimateGetTemperature.yaml @@ -9,7 +9,7 @@ tests: - "더워?" intent: name: HassClimateGetTemperature - response: "20 °C입니다" + response: "20입니다" - sentences: - "거실 온도 몇 도야?" @@ -23,4 +23,4 @@ tests: name: HassClimateGetTemperature slots: area: 거실 - response: "20 °C입니다" + response: "20입니다" diff --git a/tests/nb/_fixtures.yaml b/tests/nb/_fixtures.yaml index cd6000a2f7..248c47e84d 100644 --- a/tests/nb/_fixtures.yaml +++ b/tests/nb/_fixtures.yaml @@ -84,9 +84,9 @@ entities: - name: "Termostat stue" id: "climate.living_room_thermostat" area: "living_room" - state: "22" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 22 - name: "Stuelampe" id: "light.living_room_lamp" diff --git a/tests/nb/climate_HassClimateGetTemperature.yaml b/tests/nb/climate_HassClimateGetTemperature.yaml index 8b50b2a8f9..c4c6415efd 100644 --- a/tests/nb/climate_HassClimateGetTemperature.yaml +++ b/tests/nb/climate_HassClimateGetTemperature.yaml @@ -8,7 +8,7 @@ tests: - er det varmt? intent: name: HassClimateGetTemperature - response: 22 °C + response: "22" - sentences: - hva er temperatur i stue? - hva er temperatur i stuen? @@ -33,4 +33,4 @@ tests: name: HassClimateGetTemperature slots: area: Stue - response: 22 °C + response: "22" diff --git a/tests/nl/_fixtures.yaml b/tests/nl/_fixtures.yaml index f9d786a13e..a24980a080 100644 --- a/tests/nl/_fixtures.yaml +++ b/tests/nl/_fixtures.yaml @@ -727,3 +727,31 @@ entities: attributes: device_class: wind_speed unit_of_measurement: "km/h" + + - name: "Joost" + id: "person.jospeh" + state: "home" + - name: "Ada" + id: "person.ada" + state: "werk" + - name: "Piet" + id: "person.piet" + state: "not_home" + + - name: "Jumbo" + id: "todo.jumbo" + state: "" + + - name: "Amsterdam" + id: "weather.london" + state: "rainy" + attributes: + temperature: "12" + temperature_unit: "°C" + + - name: "Tilburg" + id: "weather.tilburg" + state: "sunny" + attributes: + temperature: "20" + temperature_unit: "°C" diff --git a/tests/nl/person_HassGetState.yaml b/tests/nl/person_HassGetState.yaml new file mode 100644 index 0000000000..f664c14054 --- /dev/null +++ b/tests/nl/person_HassGetState.yaml @@ -0,0 +1,158 @@ +language: nl +tests: + - sentences: + - "waar is Joost" + - "waar bevindt Joost zich" + intent: + name: HassGetState + slots: + domain: person + name: Joost + response: "Joost is thuis" + - sentences: + - "waar is Ada" + - "waar bevindt Ada zich" + intent: + name: HassGetState + slots: + domain: person + name: Ada + response: "Ada is in zone werk" + - sentences: + - "waar is Piet" + - "waar bevindt Piet zich" + intent: + name: HassGetState + slots: + domain: person + name: Piet + response: "Piet is niet thuis" + + - sentences: + - "is Ada thuis" + intent: + name: HassGetState + slots: + domain: person + name: Ada + state: home + response: "Nee, die is in de zone werk" + - sentences: + - "is Ada weg" + intent: + name: HassGetState + slots: + domain: person + name: Ada + state: not_home + response: "Nee, die is in de zone werk" + - sentences: + - "is Ada in de zone werk" + intent: + name: HassGetState + slots: + domain: person + name: Ada + state: werk + response: "Ja" + + - sentences: + - "is er iemand thuis" + intent: + name: HassGetState + slots: + domain: person + state: home + response: "Ja, Joost" + - sentences: + - "is er iemand niet thuis" + intent: + name: HassGetState + slots: + domain: person + state: not_home + response: "Ja, Piet" + - sentences: + - "is er iemand op het werk" + intent: + name: HassGetState + slots: + domain: person + state: werk + response: "Ja, Ada" + + - sentences: + - "is iedereen thuis" + intent: + name: HassGetState + slots: + domain: person + state: home + response: "Nee, Ada en Piet niet" + - sentences: + - "is iedereen weg" + intent: + name: HassGetState + slots: + domain: person + state: not_home + response: "Nee, Ada en Joost niet" + - sentences: + - "is iedereen op het werk" + intent: + name: HassGetState + slots: + domain: person + state: werk + response: "Nee, Joost en Piet niet" + + - sentences: + - "wie is er thuis" + intent: + name: HassGetState + slots: + domain: person + state: home + response: "Joost" + - sentences: + - "wie is er niet thuis" + - "wie is er weg" + intent: + name: HassGetState + slots: + domain: person + state: not_home + response: "Piet" + - sentences: + - "wie is er op het werk" + intent: + name: HassGetState + slots: + domain: person + state: werk + response: "Ada" + + - sentences: + - "hoeveel mensen zijn er thuis" + intent: + name: HassGetState + slots: + domain: person + state: home + response: "1" + - sentences: + - "hoeveel mensen zijn er weg" + intent: + name: HassGetState + slots: + domain: person + state: not_home + response: "1" + - sentences: + - "hoeveel mensen zijn er op het werk" + intent: + name: HassGetState + slots: + domain: person + state: werk + response: "1" diff --git a/tests/nl/shopping_list_HassShoppingListAddItem.yaml b/tests/nl/shopping_list_HassShoppingListAddItem.yaml index f9c3ec3744..f3717f3218 100644 --- a/tests/nl/shopping_list_HassShoppingListAddItem.yaml +++ b/tests/nl/shopping_list_HassShoppingListAddItem.yaml @@ -8,4 +8,4 @@ tests: name: HassShoppingListAddItem slots: item: "appels " - response: Appels toegevoegd + response: appels toegevoegd diff --git a/tests/nl/todo_HassListAddItem.yaml b/tests/nl/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..bdc2e06d79 --- /dev/null +++ b/tests/nl/todo_HassListAddItem.yaml @@ -0,0 +1,12 @@ +language: nl +tests: + - sentences: + - zet appels op de Jumbo boodschappenlijst + - voeg appels aan het Jumbo boodschappenlijstje toe + - voeg appels toe aan het Jumbo lijstje + intent: + name: HassListAddItem + slots: + item: "appels " + name: "Jumbo" + response: appels toegevoegd diff --git a/tests/nl/weather_HassGetWeather.yaml b/tests/nl/weather_HassGetWeather.yaml new file mode 100644 index 0000000000..1a2cfd0a12 --- /dev/null +++ b/tests/nl/weather_HassGetWeather.yaml @@ -0,0 +1,18 @@ +language: nl +tests: + - sentences: + - "wat is de weersvoorspelling voor Tilburg" + - "hoe is het weer in Tilburg" + intent: + name: HassGetWeather + slots: + name: Tilburg + response: 20 °C en zonnig + + - sentences: + - "hoe is de weersvoorspelling voor Amsterdam" + intent: + name: HassGetWeather + slots: + name: Amsterdam + response: 12 °C met regen diff --git a/tests/pt/_fixtures.yaml b/tests/pt/_fixtures.yaml index 57671b1673..f38f2fdd26 100644 --- a/tests/pt/_fixtures.yaml +++ b/tests/pt/_fixtures.yaml @@ -85,9 +85,9 @@ entities: - name: "Termostato" id: "climate.termostato" area: "sala_de_estar" - state: "19" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 19 - name: "Front Door" id: "lock.front_door" diff --git a/tests/pt/climate_HassClimateGetTemperature.yaml b/tests/pt/climate_HassClimateGetTemperature.yaml index 00d7e6acc3..1b2969ca42 100644 --- a/tests/pt/climate_HassClimateGetTemperature.yaml +++ b/tests/pt/climate_HassClimateGetTemperature.yaml @@ -5,7 +5,7 @@ tests: - qual a temperatura? intent: name: HassClimateGetTemperature - response: "19 °C" + response: "19" - sentences: - qual a temperatura da sala de estar? @@ -14,4 +14,4 @@ tests: name: HassClimateGetTemperature slots: area: Sala de Estar - response: "19 °C" + response: "19" diff --git a/tests/ro/_fixtures.yaml b/tests/ro/_fixtures.yaml index 5f6908e648..8c20679843 100644 --- a/tests/ro/_fixtures.yaml +++ b/tests/ro/_fixtures.yaml @@ -63,9 +63,16 @@ entities: - name: "Caloriferul" id: climate.radiator attributes: - unit_of_measurement: "°C" + current_temperature: 21 area: bedroom - state: "21" + state: "heat" + + - name: "Termostatul" + id: climate.thermostat + attributes: + current_temperature: 1 + area: living_room + state: "heat" # Covers - name: "usa principala" diff --git a/tests/ro/climate_HassClimateGetTemperature.yaml b/tests/ro/climate_HassClimateGetTemperature.yaml index 62cadd3530..4ebafbbd58 100644 --- a/tests/ro/climate_HassClimateGetTemperature.yaml +++ b/tests/ro/climate_HassClimateGetTemperature.yaml @@ -1,5 +1,13 @@ language: ro tests: + - sentences: + - "cat este temperatura indicata de termostatul" + - "ce temperatura indica termostatul" + intent: + name: HassClimateGetTemperature + slots: + name: "Termostatul" + response: "1 grad" - sentences: - "ce temperatura e in dormitor" - "care e temperatura din dormitor" @@ -23,3 +31,15 @@ tests: context: area: bedroom response: "21 de grade" + - sentences: + - "ce temperatura e in sufragerie" + - "care e temperatura din sufragerie" + - "cate grade sunt in sufragerie" + - "cat de cald este in sufragerie" + - "cat e de racoare in sufragerie" + - "este rece in sufragerie" + intent: + name: HassClimateGetTemperature + slots: + area: "Sufragerie" + response: "1 grad" diff --git a/tests/ro/light_HassTurnOff.yaml b/tests/ro/light_HassTurnOff.yaml index db79348e54..deaa8280c2 100644 --- a/tests/ro/light_HassTurnOff.yaml +++ b/tests/ro/light_HassTurnOff.yaml @@ -35,11 +35,15 @@ tests: domain: light response: "Am stins luminile" - sentences: - - "opreste lumina" + - "stinge lumina" + - "opreste lumina aici" + - "opreste toate luminile" + - "stinge toate luminile de aici" intent: name: HassTurnOff + context: + area: Dormitor slots: domain: light - context: - area: bedroom + area: Dormitor response: "Am stins luminile" diff --git a/tests/ro/light_HassTurnOn.yaml b/tests/ro/light_HassTurnOn.yaml index 9ba648dc55..8b2f1c1b4d 100644 --- a/tests/ro/light_HassTurnOn.yaml +++ b/tests/ro/light_HassTurnOn.yaml @@ -36,10 +36,14 @@ tests: response: "Am aprins luminile" - sentences: - "porneste lumina" + - "aprinde lumina aici" + - "aprinde toate luminile" + - "porneste toate luminile de aici" intent: name: HassTurnOn + context: + area: Dormitor slots: domain: light - context: - area: bedroom + area: Dormitor response: "Am aprins luminile" diff --git a/tests/ro/weather_HassGetWeather.yaml b/tests/ro/weather_HassGetWeather.yaml index 7851b6942e..c96938684c 100644 --- a/tests/ro/weather_HassGetWeather.yaml +++ b/tests/ro/weather_HassGetWeather.yaml @@ -1,5 +1,13 @@ language: ro tests: + - sentences: + - "cum e vremea?" + - "cate grade sunt afara?" + - "cat de frig este afara?" + intent: + name: HassGetWeather + response: 18 °C cu ploaie + - sentences: - "cum e vremea la Bucuresti?" - "cate grade sunt la Bucuresti?" diff --git a/tests/sl/_fixtures.yaml b/tests/sl/_fixtures.yaml index 645829ad5c..42d1f8561e 100644 --- a/tests/sl/_fixtures.yaml +++ b/tests/sl/_fixtures.yaml @@ -182,44 +182,69 @@ entities: - name: "radiator|radiatorji" id: "climate.trv_living_room" area: "living_room" - state: "21" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 21 - name: "zunanja | zunaj | balkonu" id: "sensor.outside_temperature" state: "17" area: "balcony" attributes: - unit_of_measurement: "°C" + current_temperature: 17 - name: "temperatura dnevna soba" id: "sensor.living_room" state: "21" area: "living_room" attributes: - unit_of_measurement: "°C" + unit_of_measurement: "stopinj" #locks - name: "vhodna vrata" id: "lock.front_door" area: "entrance" state: "locked" - - name: "Zadnja vrata" + - name: "zadnja vrata" id: "lock.back_door" area: "kitchen" state: "unlocked" - - name: "Dvoriščna vrata" + - name: "dvoriščna vrata" id: "lock.yard_door" state: "locked" - - name: "Dovozna vrata" + - name: "dovozna vrata" id: "lock.yard_gate" - state: "locked" + state: "unlocked" - name: "Igranje" id: "scene.play_mode" - 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: "opravila" + id: "todo.opravila" + state: "" + - name: "v Benetkah" + id: "weather.benetke" + state: "jasno" + attributes: + temperature: "28" + temperature_unit: "stopinj" + - name: "Lev" + id: "person.Lev" + state: "doma" + - name: "Arya" + id: "person.arya" + state: "v službi" + - name: "Jon" + id: "person.jon" + state: "ni doma" diff --git a/tests/sl/climate_HassClimateGetTemperature.yaml b/tests/sl/climate_HassClimateGetTemperature.yaml index fc746084e8..4ec88a2fd1 100644 --- a/tests/sl/climate_HassClimateGetTemperature.yaml +++ b/tests/sl/climate_HassClimateGetTemperature.yaml @@ -5,17 +5,18 @@ tests: - povej mi temperaturo? intent: name: HassClimateGetTemperature - response: "21 °C" + response: "21 stopinj" - sentences: - kakšna je temperatura v dnevni sobi? - ali je vroče v dnevni sobi? + - na koliko stopinj je nastavljena temperatura v dnevni sobi? intent: name: HassClimateGetTemperature slots: area: - dnevni sobi - response: "21 °C" + response: "21 stopinj" - sentences: - kakšna je temperatura na balkonu? @@ -29,7 +30,8 @@ tests: - kakšna je zunanja temperatura? - kakšna je temperatura zunaj? - povej mi temperaturo zunaj? + - koliko stopinj je zunaj? intent: name: HassClimateGetTemperature - response: "21 °C" + response: "21 stopinj" diff --git a/tests/sl/homeassistant_HassNevermind.yaml b/tests/sl/homeassistant_HassNevermind.yaml new file mode 100644 index 0000000000..076fc41275 --- /dev/null +++ b/tests/sl/homeassistant_HassNevermind.yaml @@ -0,0 +1,10 @@ +language: sl +tests: + - sentences: + - "prekini" + - "prekliči" + - "odnehaj" + - "nima veze" + - "pozabi" + intent: + name: HassNevermind diff --git a/tests/sl/light_HassTurnOff.yaml b/tests/sl/light_HassTurnOff.yaml index fed1efb15d..6a1149ebbd 100644 --- a/tests/sl/light_HassTurnOff.yaml +++ b/tests/sl/light_HassTurnOff.yaml @@ -3,6 +3,7 @@ tests: - sentences: - Izključi vse luči v kuhinji - Izključi luč v kuhinji + - Izklopi luč v kuhinji - Izključi vsa svetila v kuhinji - Izključi vso razsvetljavo v kuhinji intent: @@ -12,4 +13,4 @@ tests: - kuhinji - kuhinjsko domain: light - response: "Luči so izklopljene" + response: "Izklopljeno" diff --git a/tests/sl/light_HassTurnOn.yaml b/tests/sl/light_HassTurnOn.yaml index 10c1f1284f..f1daab8362 100644 --- a/tests/sl/light_HassTurnOn.yaml +++ b/tests/sl/light_HassTurnOn.yaml @@ -3,6 +3,7 @@ tests: - sentences: - Vključi luči v kuhinji - Vključi luč v kuhinji + - Prižgi luč v kuhinji - Vključi vsa svetila v kuhinji - Vključi vso razsvetljavo v kuhinji intent: @@ -11,4 +12,4 @@ tests: area: - kuhinji domain: light - response: "Luči so vklopljene" + response: "Vklopljeno" diff --git a/tests/sl/lock_HassGetState.yaml b/tests/sl/lock_HassGetState.yaml new file mode 100644 index 0000000000..26f6c13791 --- /dev/null +++ b/tests/sl/lock_HassGetState.yaml @@ -0,0 +1,48 @@ +language: sl +tests: + - sentences: + - "ali so vhodna vrata odklenjena?" + intent: + name: HassGetState + slots: + domain: lock + name: "vhodna vrata" + state: "unlocked" + response: "Ne" + + - sentences: + - "so kakšna vrata zaklenjena?" + - "ali so vrata zaklenjena?" + intent: + name: HassGetState + slots: + domain: lock + state: "locked" + response: "Da, dvoriščna vrata in vhodna vrata" + + - sentences: + - "ali so vsa vrata zaklenjena?" + intent: + name: HassGetState + slots: + domain: lock + state: "locked" + response: "Ne, nista dovozna vrata in zadnja vrata" + + - sentences: + - "katera vrata so zaklenjena?" + intent: + name: HassGetState + slots: + domain: lock + state: "locked" + response: "dvoriščna vrata in vhodna vrata" + + - sentences: + - "koliko vrat je zaklenjenih?" + intent: + name: HassGetState + slots: + domain: lock + state: "locked" + response: "2" diff --git a/tests/sl/lock_HassTurnOff.yaml b/tests/sl/lock_HassTurnOff.yaml new file mode 100644 index 0000000000..34d6972255 --- /dev/null +++ b/tests/sl/lock_HassTurnOff.yaml @@ -0,0 +1,25 @@ +language: sl +tests: + - sentences: + - "odkleni vhodna vrata" + intent: + name: HassTurnOff + context: + domain: lock + slots: + name: "vhodna vrata" + response: "Odklenjeno" + + - sentences: + - "odkleni vrata v kuhinji" + - "odkleni ključavnico v kuhinji" + - "odkleni kuhinjska vrata" + intent: + name: HassTurnOff + slots: + area: + - "kuhinji" + - "kuhinjska" + domain: lock + name: all + response: "Odklenjeno" diff --git a/tests/sl/lock_HassTurnOn.yaml b/tests/sl/lock_HassTurnOn.yaml new file mode 100644 index 0000000000..a506f627a8 --- /dev/null +++ b/tests/sl/lock_HassTurnOn.yaml @@ -0,0 +1,25 @@ +language: sl +tests: + - sentences: + - "zakleni vhodna vrata" + intent: + name: HassTurnOn + context: + domain: lock + slots: + name: "vhodna vrata" + response: "Zaklenjeno" + + - sentences: + - "zakleni vrata v kuhinji" + - "zakleni ključavnico v kuhinji" + - "zakleni kuhinjska vrata" + intent: + name: HassTurnOn + slots: + area: + - "kuhinji" + - "kuhinjska" + domain: lock + name: all + response: "Zaklenjeno" diff --git a/tests/sl/person_HassGetState.yaml b/tests/sl/person_HassGetState.yaml new file mode 100644 index 0000000000..b965ed8c84 --- /dev/null +++ b/tests/sl/person_HassGetState.yaml @@ -0,0 +1,65 @@ +language: sl +tests: + - sentences: + - "kje je Lev" + intent: + name: HassGetState + slots: + domain: person + name: Lev + response: "Lev je doma" + + - sentences: + - "Kje je Arya" + intent: + name: HassGetState + slots: + domain: person + name: Arya + response: "Arya je v službi" + + - sentences: + - "ali je Arya doma" + intent: + name: HassGetState + slots: + domain: person + name: Arya + state: doma + response: "Ne" + + - sentences: + - "ali je kdo doma" + intent: + name: HassGetState + slots: + domain: person + state: doma + response: "Da, Lev" + + - sentences: + - "ali so vsi doma" + intent: + name: HassGetState + slots: + domain: person + state: doma + response: "Ne, nista Arya in Jon" + + - sentences: + - "kdo je doma" + intent: + name: HassGetState + slots: + domain: person + state: doma + response: "Lev" + + - sentences: + - "koliko oseb je doma" + intent: + name: HassGetState + slots: + domain: person + state: doma + response: "1" diff --git a/tests/sl/scene_HassTurnOn.yaml b/tests/sl/scene_HassTurnOn.yaml new file mode 100644 index 0000000000..69b7bd69ba --- /dev/null +++ b/tests/sl/scene_HassTurnOn.yaml @@ -0,0 +1,11 @@ +language: sl +tests: + - sentences: + - "aktiviraj sceno igranje" + - "zaženi igranje" + intent: + name: HassTurnOn + slots: + domain: scene + name: "Igranje" + response: "Aktivirana" diff --git a/tests/sl/script_HassTurnOn.yaml b/tests/sl/script_HassTurnOn.yaml new file mode 100644 index 0000000000..ee9a9bb131 --- /dev/null +++ b/tests/sl/script_HassTurnOn.yaml @@ -0,0 +1,10 @@ +language: sl +tests: + - sentences: + - "zaženi skripto posesaj kuhinjo" + intent: + name: HassTurnOn + slots: + domain: script + name: "posesaj kuhinjo" + response: "Zagnana" diff --git a/tests/sl/shopping_list_HassShoppingListAddItem.yaml b/tests/sl/shopping_list_HassShoppingListAddItem.yaml new file mode 100644 index 0000000000..f6cf1e76c5 --- /dev/null +++ b/tests/sl/shopping_list_HassShoppingListAddItem.yaml @@ -0,0 +1,10 @@ +language: sl +tests: + - sentences: + - dodaj jabolka na moj seznam za trgovino + - dodaj jabolka na seznam + intent: + name: HassShoppingListAddItem + slots: + item: "jabolka " + response: Artikel je dodan na nakupovalni seznam diff --git a/tests/sl/todo_HassListAddItem.yaml b/tests/sl/todo_HassListAddItem.yaml new file mode 100644 index 0000000000..504d7613c6 --- /dev/null +++ b/tests/sl/todo_HassListAddItem.yaml @@ -0,0 +1,10 @@ +language: sl +tests: + - sentences: + - dodaj čiščenje na seznam za opravila + intent: + name: HassListAddItem + slots: + item: "čiščenje " + name: "opravila" + response: Dodano čiščenje 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 diff --git a/tests/zh-cn/_fixtures.yaml b/tests/zh-cn/_fixtures.yaml index e80fe59c1b..64dce426bc 100644 --- a/tests/zh-cn/_fixtures.yaml +++ b/tests/zh-cn/_fixtures.yaml @@ -102,9 +102,9 @@ entities: - name: "溫控器" id: climate.thermostat area: living_room - state: "18" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 18 - name: "前门" id: lock.front_door diff --git a/tests/zh-cn/climate_HassClimateGetTemperature.yaml b/tests/zh-cn/climate_HassClimateGetTemperature.yaml index 9e83b9551e..bd4c9283b9 100644 --- a/tests/zh-cn/climate_HassClimateGetTemperature.yaml +++ b/tests/zh-cn/climate_HassClimateGetTemperature.yaml @@ -6,7 +6,7 @@ tests: - 现在温度 intent: name: HassClimateGetTemperature - response: "18 °C" + response: "18" - sentences: - 客厅温度是多少? - 客厅现在多少度? @@ -14,4 +14,4 @@ tests: name: HassClimateGetTemperature slots: area: 客厅 - response: "18 °C" + response: "18" diff --git a/tests/zh-tw/_fixtures.yaml b/tests/zh-tw/_fixtures.yaml index a18349680a..4da9bb7697 100644 --- a/tests/zh-tw/_fixtures.yaml +++ b/tests/zh-tw/_fixtures.yaml @@ -122,9 +122,9 @@ entities: - name: "溫控器" id: "climate.thermostat" area: "living_room" - state: "18" + state: "heat" attributes: - unit_of_measurement: "°C" + current_temperature: 18 - name: "大門" id: "lock.front_door" diff --git a/tests/zh-tw/climate_HassClimateGetTemperature.yaml b/tests/zh-tw/climate_HassClimateGetTemperature.yaml index 31512a0a3f..d13bfd299d 100644 --- a/tests/zh-tw/climate_HassClimateGetTemperature.yaml +++ b/tests/zh-tw/climate_HassClimateGetTemperature.yaml @@ -6,7 +6,7 @@ tests: - "現在溫度" intent: name: HassClimateGetTemperature - response: "18 °C" + response: "18" - sentences: - "現在客廳多熱?" - "現在客廳幾度?" @@ -14,4 +14,4 @@ tests: name: HassClimateGetTemperature slots: area: 客廳 - response: "18 °C" + response: "18"