Recipe

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.

IntermediateHome serverBrowserInstructions checked October 15, 2026

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:

  1. 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.
  2. 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.

Check my exact hardware

What you'll build

  1. You, in an Assist chat or by voice
  2. Home Assistant
  3. Ollama integration
  4. Ollama server on your network
  5. 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, add Environment="OLLAMA_HOST=0.0.0.0:11434" under [Service], then systemctl daemon-reload and systemctl restart ollama.
  • Windows: quit Ollama, add OLLAMA_HOST as 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:

bash
ollama pull <model-from-the-tools-list>

2. Add the integration

  1. In Home Assistant, go to Settings > Devices & services > Add Integration and choose Ollama.
  2. URL: http://<ollama-machine-ip>:11434, or http://localhost:11434 if Ollama runs on the same machine.
  3. Model: the model you pulled.
  4. Leave Control Home Assistant off for now. Newer releases label this choice Assist or No control.

3. Make it an assistant

  1. Go to Settings > Voice assistants > Add assistant, give it a name, and pick the Ollama agent as the Conversation agent.
  2. 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

  1. Open the Expose tab under Settings > Voice assistants. Expose one test light and nothing else.
  2. In the Ollama integration's options, turn on Control Home Assistant (Assist). It can now control or report on exposed entities only.
  3. 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

  1. "Which lights are on?" It answers from exposed entities only.
  2. "Turn off the test light." The light changes state.
  3. "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?

Troubleshooting

What stays on your network

ComponentRuns whereNote
Chat modelOn your computerRuns on your Ollama machine, unless you pick a :cloud model; OLLAMA_NO_CLOUD=1 blocks those
Home Assistant and AssistOn your computer
Speech-to-text and text-to-speechOn your computer, after a one-time downloadOnly if you add voice
Model downloadOn your computer, after a one-time downloadNeeds the internet once
Ollama API on your networkOn your computerNo password: anyone on the network can use it, so restrict it with a firewall

Go deeper

Sources

The steps on this page were checked against these official pages on the date shown.