{"id":13580043,"url":"https://github.com/home-assistant/intents","last_synced_at":"2025-05-11T05:46:56.361Z","repository":{"id":64534692,"uuid":"576483053","full_name":"home-assistant/intents","owner":"home-assistant","description":"Intents to be used with Home Assistant","archived":false,"fork":false,"pushed_at":"2025-05-09T10:40:45.000Z","size":8640,"stargazers_count":524,"open_issues_count":140,"forks_count":600,"subscribers_count":36,"default_branch":"main","last_synced_at":"2025-05-11T05:46:43.493Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://developers.home-assistant.io/docs/voice/overview/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/home-assistant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://www.openhomefoundation.org"}},"created_at":"2022-12-10T01:34:19.000Z","updated_at":"2025-05-09T10:40:50.000Z","dependencies_parsed_at":"2024-01-31T21:24:28.140Z","dependency_job_id":"0bb459e4-78ee-4b3a-96d8-c995d7b0818c","html_url":"https://github.com/home-assistant/intents","commit_stats":{"total_commits":1726,"total_committers":253,"mean_commits":6.822134387351778,"dds":0.8679026651216686,"last_synced_commit":"a3b9e7a9a3bd933d11edaa3d2ec786be45550a03"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fintents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fintents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fintents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fintents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/home-assistant","download_url":"https://codeload.github.com/home-assistant/intents/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253523718,"owners_count":21921818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-08-01T15:01:46.478Z","updated_at":"2025-05-11T05:46:56.338Z","avatar_url":"https://github.com/home-assistant.png","language":"Python","funding_links":["https://www.openhomefoundation.org"],"categories":["Python"],"sub_categories":[],"readme":"# Intents for Home Assistant\n\nThis repository contains training data for Home Assistant's local voice control.\n\n- [Progress per language and intent](https://home-assistant.github.io/intents/)\n- [How to contribute](https://developers.home-assistant.io/docs/voice/intent-recognition/contributing/)\n- [Language leaders](https://developers.home-assistant.io/docs/voice/language-leaders/)\n- [Supported intents](https://developers.home-assistant.io/docs/intent_builtin/)\n- [Supported languages](https://developers.home-assistant.io/docs/voice/intent-recognition/supported-languages/)\n\nRepository layout:\n\n- [`languages.yaml`](languages.yaml)\n  - Supported languages and their language leader.\n- [`intents.yaml`](intents.yaml)\n  - Supported intents\n- `sentences/\u003clanguage\u003e`\n  - Intent matching sentences in YAML files for `\u003clanguage\u003e` with the name `\u003cdomain\u003e_\u003cintent\u003e.yaml`.\n  - [File format](https://developers.home-assistant.io/docs/voice/intent-recognition/template-sentence-syntax/)\n- `responses/\u003clanguage\u003e`\n  - YAML files for `\u003clanguage\u003e` with responses for intents.\n  - [File format](https://developers.home-assistant.io/docs/voice/intent-recognition/test-syntax/)\n- `tests/\u003clanguage\u003e`\n  - YAML files for `\u003clanguage\u003e` with test sentences and corresponding intents.\n  - [File format](https://developers.home-assistant.io/docs/voice/intent-recognition/test-syntax/)\n\nSee the [documentation](docs/README.md) for more information.\n\n# Development\n\nThe easiest way to start contributing is by using [devcontainers](https://containers.dev/).\nThe repository is configured for devcontainer support.\nPlease, check how you can use devcontainers with your favourite IDE.\n\n## Run tests\n\nValidate that the data is correctly formatted:\n\n```sh\npython3 -m script.intentfest validate --language nl\n```\n\nRun the tests. This will parse the sentences and verifies them with the test sentences.\n\n```sh\npytest tests --language nl -k fan_HassTurnOn\n```\n\nLeave off `--language` to test all languages. Leave off `-k` to test all files. Add `-n auto` to use test parallelization.\n\n## Test parsing sentences\n\nYou can try parsing sentences for a specific language with:\n\n```sh\npython3 -m script.intentfest parse --language en --sentence 'turn on the lights in the kitchen'\n```\n\nThis will print a line of JSON for each `--sentence`:\n\n```json\n{\n  \"text\": \"turn on the lights in the kitchen\",\n  \"match\": true,\n  \"intent\": \"HassTurnOn\",\n  \"slots\": {\n    \"area\": \"kitchen\",\n    \"domain\": \"light\"\n  }\n}\n```\n\n## Test sampling sentences\n\nYou can sample the possible sentences for a specific language with:\n\n```sh\npython3 -m script.intentfest sample --language en -n 1\n```\n\nThis will print a line of JSON for each possible sentence:\n\n```sh\npython3 -m script.intentfest sample --language en -n 1\n{\"intent\": \"HassTurnOff\", \"text\": \"turn off all the fan in the kitchen\"}\n{\"intent\": \"HassTurnOn\", \"text\": \"turn on the light in the kitchen\"}\n{\"intent\": \"HassCloseCover\", \"text\": \"close the bedroom lamp\"}\n{\"intent\": \"HassClimateSetTemperature\", \"text\": \"set the temp to 0 degrees celsius\"}\n{\"intent\": \"HassLightSet\", \"text\": \"set the bedroom lamp brightness to 0 percent\"}\n{\"intent\": \"HassOpenCover\", \"text\": \"open the bedroom lamp\"}\n{\"intent\": \"HassClimateGetTemperature\", \"text\": \"what's the temp \"}\n```\n\nYou can filter for specific intents by adding `--intents HassTurnOn HassTurnOff`.\n\nLeave off `-n` to generate all possible sentences.\n\n## Test sampling template\n\nTo quickly test a sentence template, use:\n\n```sh\npython3 -m script.intentfest sample_template \u003ctemplate\u003e\n```\n\nFor example:\n\n```sh\npython3 -m script.intentfest sample_template 'open [the] door'\nopen the door\nopen door\n```\n\nYou can add lists, ranges, and expansion rules as well:\n\n```sh\npython3 -m script.intentfest sample_template 'set color to \u003ccolor\u003e and brightness to {brightness}' --values color red green --range brightness 1 2 --rule color '[the] {color}'\n```\n\n## Generate LLM prompt to help with translations\n\nIf you start to translate a new intent, you can generate a prompt to paste into ChatGPT or another LLM to help with translations\n\nExample to generate a prompt to translate the `HassListAddItem` intent to Italian:\n\n```sh\npython3 -m script.intentfest llm_template it HassListAddItem\n```\n\n## Add new language\n\n```sh\npython3 -m script.intentfest add_language \u003clanguage code\u003e \u003clanguage name\u003e\n```\n\n`\u003clanguage code\u003e` should be something like `en` or `pl` according to [ISO 639](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n\nLanguage name should be the name of the language in its own language.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant%2Fintents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhome-assistant%2Fintents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant%2Fintents/lists"}