A smart-home assistant with Home Assistant and Ollama
Ask your smart home questions in plain language, answered by a model on your own network, with only the devices you choose exposed.
Written by Jakub Rusinowski · Updated
Home Assistant has a built-in Ollama integration. Point it at an Ollama server on your network, pick a model that supports tools, and set it as the conversation agent of an assistant. It can then answer questions and control only the devices you expose to it. Start read-only with one test light; keep locks, alarms and garage doors out.
Will this work on my computer?
The model runs on whatever computer runs Ollama, usually not the Home Assistant box itself. Two things decide whether it works:
- The model must support tools. Home Assistant's documentation says only models that support tools may control Home Assistant. Ollama lists them under the Tools filter on its model search.
- It must fit the Ollama machine. Check the tools-capable model you picked in the hardware checker, or start from the Model Finder's everyday-assistant plan and confirm its suggestion is in Ollama's Tools list.
What you'll build
- You, in an Assist chat or by voice
- Home Assistant
- Ollama integration
- Ollama server on your network
- Assist API: only the entities you exposed
Before you start
- A running Home Assistant. The Ollama integration has been part of it since Home Assistant 2024.4.
- A computer on the same network running Ollama, from ollama.com/download.
- If Ollama is on a different machine from Home Assistant, Ollama must listen on the network: by default it only answers on its own machine (
127.0.0.1:11434).
Recommended stack
Pick: Home Assistant's built-in Ollama integration, with Ollama on a machine that has enough memory for a tools-capable model. No custom components.
Voice (optional): Whisper for speech-to-text and Piper for text-to-speech, connected through Home Assistant's Wyoming integration. Our offline voice assistant guide covers the same pieces outside Home Assistant.
Setup steps
1. Let Home Assistant reach Ollama
On the Ollama machine, make it listen on the network:
- macOS:
launchctl setenv OLLAMA_HOST "0.0.0.0:11434", then restart the Ollama app. - Linux:
systemctl edit ollama.service, addEnvironment="OLLAMA_HOST=0.0.0.0:11434"under[Service], thensystemctl daemon-reloadandsystemctl restart ollama. - Windows: quit Ollama, add
OLLAMA_HOSTas a user environment variable, then start Ollama again.
Ollama's API has no password. Listening on 0.0.0.0 lets every device on your network use it. Allow only the Home Assistant machine through your firewall: Windows firewall on the LAN, Ollama environment variables on Linux.
Then pull a model from Ollama's Tools list:
ollama pull <model-from-the-tools-list>2. Add the integration
- In Home Assistant, go to Settings > Devices & services > Add Integration and choose Ollama.
- URL:
http://<ollama-machine-ip>:11434, orhttp://localhost:11434if Ollama runs on the same machine. - Model: the model you pulled.
- Leave Control Home Assistant off for now. Newer releases label this choice Assist or No control.
3. Make it an assistant
- Go to Settings > Voice assistants > Add assistant, give it a name, and pick the Ollama agent as the Conversation agent.
- Ask it something read-only, such as "What can you help me with?" It answers but cannot touch your devices yet.
4. Expose one test device, then allow control
- Open the Expose tab under Settings > Voice assistants. Expose one test light and nothing else.
- In the Ollama integration's options, turn on Control Home Assistant (Assist). It can now control or report on exposed entities only.
- Ask "Is the test light on?", then "Turn the test light off."
Never expose locks, alarms or garage doors in this first setup. Home Assistant keeps them out of reach of voice commands for this reason, and a model can misunderstand a sentence. Keep the exposed list short: Home Assistant's documentation notes that smaller models make more mistakes as it grows.
5. Add voice (optional)
Install Whisper (speech-to-text) and Piper (text-to-speech), add both through the Wyoming integration under Settings > Devices & services, then edit your assistant and set Speech-to-text to Whisper and Text-to-speech to Piper.
Test it
- "Which lights are on?" It answers from exposed entities only.
- "Turn off the test light." The light changes state.
- "Unlock the front door." With no lock exposed, a good setup says it cannot.
Verify it worked
- The assistant answers through the Ollama model, not Home Assistant's built-in agent.
- It can see and change the one exposed light, and nothing else.
- Disconnect the internet (keep your home network): it still works.
Did you get this working?
Thanks. Your answer helps us see which recipes need work.
Troubleshooting
- The integration cannot connect. Ollama is listening only on itself, or a firewall blocks port 11434: connection refused, Windows firewall on the LAN, Ollama environment variables on Linux.
- It chats but never controls anything. The model has no tool support, Control Home Assistant is off, or the entity is not exposed.
- It controls the wrong thing. Expose fewer entities, give them clear names, or try a larger tools-capable model.
- The first answer is slow. The model is loading into memory: model loads but is slow.
What stays on your network
| Component | Runs where | Note |
|---|---|---|
| Chat model | On your computer | Runs on your Ollama machine, unless you pick a :cloud model; OLLAMA_NO_CLOUD=1 blocks those |
| Home Assistant and Assist | On your computer | |
| Speech-to-text and text-to-speech | On your computer, after a one-time download | Only if you add voice |
| Model download | On your computer, after a one-time download | Needs the internet once |
| Ollama API on your network | On your computer | No password: anyone on the network can use it, so restrict it with a firewall |
Go deeper
- Offline voice assistant: Whisper + local LLM + TTS
- Personal AI home server
- Tool calling with local models
- Hardware checker · Model Finder
Sources
The steps on this page were checked against these official pages on the date shown.
- home-assistant.io/integrations/ollama/ (2026-10-15)
- home-assistant.io/voice_control/assist_create_open_ai_personality/ (2026-10-15)
- home-assistant.io/voice_control/voice_remote_expose_devices/ (2026-10-15)
- home-assistant.io/voice_control/voice_remote_local_assistant/ (2026-10-15)
- docs.ollama.com/faq (2026-10-15)
- ollama.com/search?c=tools (2026-10-15)