Agents and automation

Adding an Ollama conversation agent to Home Assistant: exposed entities and instructions

The model interprets the sentence; the action only happens inside the entities you exposed.

The Ollama integration in Home Assistant uses an external Ollama server as a conversation agent. The model interprets what you said, and with device control on it can only act on entities exposed through the Assist API1. This guide covers the order for the model, instructions, exposure list and aliases.

Requirements and key details
  • The Ollama integration adds a conversation agent; device control is experimental.
  • The exposed-entity list in the Assist API defines what it can control.
  • Aliases let the same device answer to several names and languages.

The path a question takes to the model

Assist starts with the wake word, turns speech into text and hands that text to a conversation agent. With the Ollama integration, a model on your local server fills that role. It either writes an answer or, with device control on, calls the Assist API.

Changing the model therefore does not change which devices can be operated. The model chooses which device to use and shapes the sentence; Home Assistant throws the switch.

A robot inside a clear enclosure sits beside a router, storage box, and documents
The model on your local server interprets the sentence; Home Assistant does the switching.

Setting the model and the instructions

Add the Ollama integration under Settings > Devices & services and enter the server URL (for example http://192.168.0.20:11434). An API key is needed only if the server requires authentication, and naming a model downloads it during setup.

In the instructions, state the answer language and length and anything the model must not do. Longer text eats into the model's context, so start with naming rules and a short-answer preference, and add only what you need.

What the Ollama integration asks for
AspectValue to enterWatch out
URLThe Ollama server address and portIt must be reachable from Home Assistant
ModelA size that handles device commandsVery large models slow the reply
InstructionsLanguage, length, forbidden actionsIt uses context, so keep it short
Control Home AssistantTurn on only when needed

The exposed list is the whole permission set

Turning device control on does not hand the model every device in the house. Only the entities you pick on the Expose tab under Settings > Voice assistants are visible to the Assist API, and the model chooses within that list.

Leave locks and garage doors out from the start. Begin with lights, switches and climate devices that are easy to undo, and add sensors first as read-only values to check.

A small computer running a search system beside document stacks
A device outside the exposed list cannot be operated even if the model picks it.

Matching names with aliases

Calling the same light 'living room light' and 'main lamp' confuses the model. Add the alias on the Expose tab and Assist recognises that name too.

Aliases also work for areas and floors. In a house that mixes Korean and English, add both names so the same device is found whichever language you speak.

What to check when it misbehaves

The Ollama integration does not connect to sentence triggers. To run a fixed phrase exactly, create a sentence trigger in an automation instead; open questions still go to the conversation agent.

If answers lag, check model size and server location first. Keeping the server on the same network cuts the round trip, and long instructions delay the first response. Say the same sentence three times in the phone app and see whether the result is stable.

Two metal devices sit on a desk and shelf beside a laptop, with cables connected to a switch box in front
Keeping the model server on the same network removes one network round trip.

Terminology notes

  1. API — A defined interface that lets other code call a program’s functions.

    Back to the text

Frequently asked questions

What should you check first in this article?
The Ollama integration in Home Assistant uses an external Ollama server as a conversation agent. The model interprets what you said, and with device control on it can only act on entities exposed through the Assist API. This guide covers the order for the model, instructions, exposure list and aliases.