A Home Assistant integration & Model to control your smart home using a Local LLM
Python
1,458
729 commits
updated Oct 11, 2026
Control your Home Assistant smart home with a completely local Large Language Model. No cloud services and no subscriptions needed. Just privacy-focused AI running entirely on your own hardware.
Home LLM is a complete solution for adding AI-powered voice and chat control to Home Assistant. It consists of two parts:
See the Setup Guide for detailed installation instructions.
Requirements: Home Assistant 2026.5.0 or newer
The integration connects language models to Home Assistant, enabling them to understand your requests and control your smart devices.
Choose how and where you want to run your models:
| Backend | Best For |
|---|---|
| Llama.cpp (built-in) | Running models directly in Home Assistant |
| Ollama | Easy setup on a separate GPU machine |
| Generic OpenAI API | LM Studio, LocalAI, vLLM, and other OpenAI-compatible servers |
| llama.cpp server | Heterogeneous (non-uniform) GPU compute setups, including CPU + GPU inference |
| OpenAI 'Responses' Style API | Cloud services supporting the 'responses' style API |
| Anthropic 'Messages' Style API | Cloud services supporting the 'messages' style API |
NOTE: When utilizing external APIs or model providers, your data will be transmitted over the internet and shared with the respective service providers. Ensure you understand the privacy implications of using these third-party services, since they will be able to see the status of all exposed entities in your Home Assistant instance, which can potentially include your current location.
The integration can control: lights, switches, fans, covers, locks, climate, media players, vacuums, buttons, timers, todo lists, and scripts
As a Conversation Agent:
As an AI Task Handler:
The "Home" models are small language models (under 5B parameters) fine-tuned specifically for smart home control. They understand natural language commands and translate them into Home Assistant service calls.
| Model Family | Size | Link |
|---|---|---|
| Llama 3.2 | 3B | acon96/Home-Llama-3.2-3B |
| Gemma | 270M | acon96/Home-FunctionGemma-270m |
Stable Models:
Multilingual Experiments:
Note: Models v1 (3B) and earlier are only compatible with integration version 0.2.17 and older.
Don't have dedicated hardware? You can use any instruction-tuned model with in-context learning (ICL). The integration provides examples that teach general-purpose models (like Qwen3, Llama 3, Mistral) how to control your smart home. See the Setup Guide for configuration details.
The fine-tuning dataset and training scripts are included in this repository:
| Version | Highlights |
|---|---|
| v0.5.0 | Breaking: conversations now go through the Home Assistant chat API, so tool results, cards and follow-up turns behave the way the built-in agents do. Configuration is simplified: the system prompt is rendered once per conversation, the conversation is trimmed to the model context automatically, sampling parameters left empty are left to the server, and the GBNF grammar is typed in instead of loaded from a file. The text-generation-webui backend has been removed - its models were switched to the OpenAI compatible API and a repair issue lists the settings that could not be carried over. Existing setups migrate on their own. |
| v0.4.12 | More fixes for Home Assistant 2026.9.0 and newer, including a fix for the "Use server sampling defaults" option not being applied properly on the llama.cpp backend |
| v0.4.11 | Compatibility fix for Home Assistant 2026.9.0 and newer |
| v0.4.10 | Bug fixes and manual parsing improvements for tool calls and thinking blocks |
| v0.4.9 | Relax dependency requirements to avoid conflicting with internal HA lib versions |
| v0.4.8 | OpenAI backends rewritten using the official openai Python library for better reliability and compatibility. New "Use server sampling defaults" to let your backend set the sampling parameters. More robust tool call parsing with auto-repair for malformed JSON, ability to disable streaming for all backends. |
| v0.4.7 | Bug fixes, update default llama_cpp_python version to support new models, and support python 3.14 for new Home Assistant versions |
| v0.4.6 | Anthropic API support, on-disk caching for Llama.cpp, new tool calling dataset |
| v0.4.5 | AI Task entities, multiple LLM APIs at once, official Ollama package |
| v0.4 | Tool calling rewrite, voice streaming, agentic tool use loop, multiple configs per backend |
| v0.3 | Home Assistant LLM API support, improved prompting, HuggingFace GGUF auto-detection |
| Version | Description |
|---|---|
| v0.5.0 | Breaking: built on the Home Assistant chat API; prompt rendered once per conversation, history trimmed to the model context, grammar typed in rather than read from a file, text-generation-webui backend removed (migrated to the OpenAI compatible API) |
| v0.4.12 | More fixes for Home Assistant 2026.9.0 and newer, including a fix for the "Use server sampling defaults" option not being applied properly on the llama.cpp backend |
| v0.4.11 | Compatibility fix for Home Assistant 2026.9.0 and newer |
| v0.4.10 | Bug fixes and manual parsing improvements for tool calls and thinking blocks |
| v0.4.9 | Relax dependency requirements to avoid conflicting with internal HA lib versions |
| v0.4.8 | OpenAI backends rewritten using the official openai Python library for better reliability and compatibility. New "Use server sampling defaults" to let your backend set the sampling parameters. More robust tool call parsing with auto-repair for malformed JSON, ability to disable streaming for all backends. |
| v0.4.7 | Bug fixes, update default llama_cpp_python version to support new models, and support python 3.14 for new Home Assistant versions |
| v0.4.6 | New dataset supporting proper tool calling, Add Anthropic "messages" style API support, Add on-disk caching for Llama.cpp backend |
| v0.4.5 | Add support for AI Task entities, Replace custom Ollama API implementation with the official ollama-python package, Support multiple LLM APIs at once |
| v0.4.4 | Fix issue with OpenAI backends appending /v1 to all URLs |
| v0.4.3 | Fix model config creation during setup |
| v0.4.2 | Fix default model settings, numeric config fields, finish_reason handling |
| v0.4.1 | Fix Llama.cpp models downloaded from HuggingFace |
| v0.4 | Rewrite for tool calling models, agentic tool use loop, voice streaming, multiple config sub-entries |
| v0.3.11 | Bug-fixes and llama.cpp version update |
| v0.3.10 | OpenAI "Responses" API support, HA 2025.7.0 compatibility |
| v0.3.9 | Fix conversation history |
| v0.3.8 | Thinking model support, HA 2025.4 compatibility |
| v0.3.7 | German ICL examples, multi-turn fixes |
| v0.3.6 | Small llama.cpp backend fixes |
| v0.3.5 | Polish ICL examples |
| v0.3.4 | Full Polish translation, improved language support |
| v0.3.3 | Generic OpenAI improvements, area handling |
| v0.3.2 | Script entity fixes |
| v0.3.1 | Basic area support in prompting |
| v0.3 | Home Assistant LLM API support, improved prompting |
| v0.2.x | Ollama support, in-context learning, flash attention, prompt caching |
| v0.1 | Initial Release |
485 followers · starred Jan 2026
809 followers · starred Mar 2024
1,110 followers · starred Mar 2026
617 followers · starred Jan 2025
A Home Assistant integration & Model to control your smart home using a Local LLM
Python
1,458
729 commits
updated Oct 11, 2026
Control your Home Assistant smart home with a completely local Large Language Model. No cloud services and no subscriptions needed. Just privacy-focused AI running entirely on your own hardware.
Home LLM is a complete solution for adding AI-powered voice and chat control to Home Assistant. It consists of two parts:
See the Setup Guide for detailed installation instructions.
Requirements: Home Assistant 2026.5.0 or newer
The integration connects language models to Home Assistant, enabling them to understand your requests and control your smart devices.
Choose how and where you want to run your models:
| Backend | Best For |
|---|---|
| Llama.cpp (built-in) | Running models directly in Home Assistant |
| Ollama | Easy setup on a separate GPU machine |
| Generic OpenAI API | LM Studio, LocalAI, vLLM, and other OpenAI-compatible servers |
| llama.cpp server | Heterogeneous (non-uniform) GPU compute setups, including CPU + GPU inference |
| OpenAI 'Responses' Style API | Cloud services supporting the 'responses' style API |
| Anthropic 'Messages' Style API | Cloud services supporting the 'messages' style API |
NOTE: When utilizing external APIs or model providers, your data will be transmitted over the internet and shared with the respective service providers. Ensure you understand the privacy implications of using these third-party services, since they will be able to see the status of all exposed entities in your Home Assistant instance, which can potentially include your current location.
The integration can control: lights, switches, fans, covers, locks, climate, media players, vacuums, buttons, timers, todo lists, and scripts
As a Conversation Agent:
As an AI Task Handler:
The "Home" models are small language models (under 5B parameters) fine-tuned specifically for smart home control. They understand natural language commands and translate them into Home Assistant service calls.
| Model Family | Size | Link |
|---|---|---|
| Llama 3.2 | 3B | acon96/Home-Llama-3.2-3B |
| Gemma | 270M | acon96/Home-FunctionGemma-270m |
Stable Models:
Multilingual Experiments:
Note: Models v1 (3B) and earlier are only compatible with integration version 0.2.17 and older.
Don't have dedicated hardware? You can use any instruction-tuned model with in-context learning (ICL). The integration provides examples that teach general-purpose models (like Qwen3, Llama 3, Mistral) how to control your smart home. See the Setup Guide for configuration details.
The fine-tuning dataset and training scripts are included in this repository:
| Version | Highlights |
|---|---|
| v0.5.0 | Breaking: conversations now go through the Home Assistant chat API, so tool results, cards and follow-up turns behave the way the built-in agents do. Configuration is simplified: the system prompt is rendered once per conversation, the conversation is trimmed to the model context automatically, sampling parameters left empty are left to the server, and the GBNF grammar is typed in instead of loaded from a file. The text-generation-webui backend has been removed - its models were switched to the OpenAI compatible API and a repair issue lists the settings that could not be carried over. Existing setups migrate on their own. |
| v0.4.12 | More fixes for Home Assistant 2026.9.0 and newer, including a fix for the "Use server sampling defaults" option not being applied properly on the llama.cpp backend |
| v0.4.11 | Compatibility fix for Home Assistant 2026.9.0 and newer |
| v0.4.10 | Bug fixes and manual parsing improvements for tool calls and thinking blocks |
| v0.4.9 | Relax dependency requirements to avoid conflicting with internal HA lib versions |
| v0.4.8 | OpenAI backends rewritten using the official openai Python library for better reliability and compatibility. New "Use server sampling defaults" to let your backend set the sampling parameters. More robust tool call parsing with auto-repair for malformed JSON, ability to disable streaming for all backends. |
| v0.4.7 | Bug fixes, update default llama_cpp_python version to support new models, and support python 3.14 for new Home Assistant versions |
| v0.4.6 | Anthropic API support, on-disk caching for Llama.cpp, new tool calling dataset |
| v0.4.5 | AI Task entities, multiple LLM APIs at once, official Ollama package |
| v0.4 | Tool calling rewrite, voice streaming, agentic tool use loop, multiple configs per backend |
| v0.3 | Home Assistant LLM API support, improved prompting, HuggingFace GGUF auto-detection |
| Version | Description |
|---|---|
| v0.5.0 | Breaking: built on the Home Assistant chat API; prompt rendered once per conversation, history trimmed to the model context, grammar typed in rather than read from a file, text-generation-webui backend removed (migrated to the OpenAI compatible API) |
| v0.4.12 | More fixes for Home Assistant 2026.9.0 and newer, including a fix for the "Use server sampling defaults" option not being applied properly on the llama.cpp backend |
| v0.4.11 | Compatibility fix for Home Assistant 2026.9.0 and newer |
| v0.4.10 | Bug fixes and manual parsing improvements for tool calls and thinking blocks |
| v0.4.9 | Relax dependency requirements to avoid conflicting with internal HA lib versions |
| v0.4.8 | OpenAI backends rewritten using the official openai Python library for better reliability and compatibility. New "Use server sampling defaults" to let your backend set the sampling parameters. More robust tool call parsing with auto-repair for malformed JSON, ability to disable streaming for all backends. |
| v0.4.7 | Bug fixes, update default llama_cpp_python version to support new models, and support python 3.14 for new Home Assistant versions |
| v0.4.6 | New dataset supporting proper tool calling, Add Anthropic "messages" style API support, Add on-disk caching for Llama.cpp backend |
| v0.4.5 | Add support for AI Task entities, Replace custom Ollama API implementation with the official ollama-python package, Support multiple LLM APIs at once |
| v0.4.4 | Fix issue with OpenAI backends appending /v1 to all URLs |
| v0.4.3 | Fix model config creation during setup |
| v0.4.2 | Fix default model settings, numeric config fields, finish_reason handling |
| v0.4.1 | Fix Llama.cpp models downloaded from HuggingFace |
| v0.4 | Rewrite for tool calling models, agentic tool use loop, voice streaming, multiple config sub-entries |
| v0.3.11 | Bug-fixes and llama.cpp version update |
| v0.3.10 | OpenAI "Responses" API support, HA 2025.7.0 compatibility |
| v0.3.9 | Fix conversation history |
| v0.3.8 | Thinking model support, HA 2025.4 compatibility |
| v0.3.7 | German ICL examples, multi-turn fixes |
| v0.3.6 | Small llama.cpp backend fixes |
| v0.3.5 | Polish ICL examples |
| v0.3.4 | Full Polish translation, improved language support |
| v0.3.3 | Generic OpenAI improvements, area handling |
| v0.3.2 | Script entity fixes |
| v0.3.1 | Basic area support in prompting |
| v0.3 | Home Assistant LLM API support, improved prompting |
| v0.2.x | Ollama support, in-context learning, flash attention, prompt caching |
| v0.1 | Initial Release |
485 followers · starred Jan 2026
809 followers · starred Mar 2024
1,110 followers · starred Mar 2026
617 followers · starred Jan 2025