Back to .md Directory

Ollama Conversation

Documents a Home Assistant custom integration that adds an Ollama-powered conversation agent for querying house state, not for controlling devices.

May 2, 2026
0 downloads
0 views
ai agent prompt automation
View source

What this file does

Documents a Home Assistant custom integration that adds an Ollama-powered conversation agent for querying house state, not for controlling devices.

When to use it

  • You want a local LLM to answer questions about your Home Assistant devices and areas
  • You already run Ollama and want to connect it to Home Assistant
  • You need a conversation agent that works in automations but not as a sentence trigger
  • You are configuring model parameters like temperature, context size, or mirostat settings

Assumes this stack

Home AssistantOllamaHACS

Ollama Conversation

The Ollama integration adds a conversation agent powered by Ollama in Home Assistant.

This conversation agent is unable to control your house. The Ollama conversation agent can be used in automations, but not as a sentence trigger. It can only query information that has been provided by Home Assistant. To be able to answer questions about your house, Home Assistant will need to provide Ollama with the details of your house, which include areas, devices and their states.

Note:

HACS does not "configure" the integration for you, You must add Ollama Conversation after installing via HACS.

  • Browse to your Home Assistant instance.
  • Go to Settings > Devices & Services.
  • In the bottom right corner, select the Add Integration button.
  • From the list, select Ollama Conversation.
  • Follow the instructions on screen to complete the setup.

Options

Options for Ollama Conversation can be set via the user interface, by taking the following steps:

  • Browse to your Home Assistant instance.
  • Go to Settings > Devices & Services.
  • If multiple instances of Ollama Conversation are configured, choose the instance you want to configure.
  • Select the integration, then select Configure.

General Settings

Settings relating to the integration itself.

OptionDescription
API TimeoutThe maximum amount of time to wait for a response from the API in seconds

System Prompt

The starting text for the AI language model to generate new text from. This text can include information about your Home Assistant instance, devices, and areas and is written using Home Assistant Templating.

Model Configuration

The language model and additional parameters to fine tune the responses.

OptionDescription
ModelThe model used to generate response.
Context SizeSets the size of the context window used to generate the next token.
Maximum TokensThe maximum number of words or “tokens” that the AI model should generate in its completion of the prompt.
Mirostat ModeEnable Mirostat sampling for controlling perplexity.
Mirostat ETAInfluences how quickly the algorithm responds to feedback from the generated text. A lower learning rate will result in slower adjustments, while a higher learning rate will make the algorithm more responsive.
Mirostat TAUControls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text.
TemperatureThe temperature of the model. A higher value (e.g., 0.95) will lead to more unexpected results, while a lower value (e.g. 0.5) will be more deterministic results.
Repeat PenaltySets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient.
Top KReduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative.
Top PWorks together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text.

Discussions

Discussions for this integration over on Home Assistant Community


What's inside

1 setup guide, 1 options section with 3 subsections, 1 table of 10 model parameters, 1 discussion link

Change this for your project

  • Replace ej52/hass-ollama-conversation with your own repository name if forking
  • Replace the discussion URL https://community.home-assistant.io/t/custom-integration-ollama-conversation/636103 with your own community thread

Where it goes

Use as the system prompt for your model call, or as the base instructions in your agent framework.

Worth borrowing

  • Separating general settings, system prompt, and model configuration into distinct UI sections
  • Using a table to document every model parameter with its effect and example values

Related Documents