About
HA Text AI connects Home Assistant to several cloud language model providers for use in automations and scripts. It supports OpenAI, Anthropic Claude, DeepSeek and Google Gemini, plus any OpenAI-compatible endpoint, including self-hosted servers when local network access is allowed. The ask question action returns the full response directly to the calling automation, which avoids the 255-character state limit. It also keeps conversation history per instance, with actions to read or clear it and to set a default system prompt. Structured JSON output and per-request overrides of model, temperature, response length and thinking mode are available. Token counts, latency and error statistics appear as sensor attributes, and setup is done in the UI with a provider API key.
Automatic summary of the README and code of smkrv/ha-text-ai. Something wrong, or are you the maintainer and want your own text here? Get in touch
Supports
Uses the vendor's cloud Needs an internet connection and an account with the vendor.
From the Marketplace Installed through the Marketplace, formerly HACS.
Actively maintained Its author released or pushed a change in the last six months.
Provides
- Sensors
Setting it up
Install it from the Marketplace and restart Home Assistant, then add it under Settings, Devices and services.
Configure HA Text AI Instance
- Instance name (e.g., 'GPT Assistant', 'Claude Helper')
- API key for authentication
- AI model to use
- Response creativity (0-2, lower = more focused)
- Maximum response length (1-100000 tokens)
- Custom API endpoint URL (optional)
- API Provider
- Minimum time between requests (0.1-60 seconds)
- API request timeout in seconds (5-600)
- Number of context messages to retain (1-20)
- Maximum conversation history size (1-100)
- Allow local network endpoints (for self-hosted proxies)
- Disable thinking/reasoning mode (Qwen /no_think, strips think blocks, Gemini 2.5 thinking_budget=0)
Provider Settings
- Instance name (e.g., 'GPT Assistant', 'Claude Helper')
- API key for authentication
- AI model to use
- Custom API endpoint URL (optional)
- Response creativity (0-2, lower = more focused)
- Maximum response length (1-100000 tokens)
- Minimum time between requests (0.1-60 seconds)
- API request timeout in seconds (5-600)
- Number of context messages to retain (1-20)
- Maximum conversation history size (1-100)
- Allow local network endpoints (for self-hosted proxies)
- Disable thinking/reasoning mode (Qwen /no_think, strips think blocks, Gemini 2.5 thinking_budget=0)
After setup
- API Provider
- API Key
- API Endpoint URL
- AI model
- Response creativity (0-2)
- Maximum response length (1-100000)
- Minimum request interval (0.1-60 seconds)
- API request timeout in seconds (5-600)
- Number of previous messages to include in context (1-20)
- Maximum conversation history size (1-100)
- Allow local network endpoints (for self-hosted proxies)
- Disable thinking/reasoning mode (Qwen /no_think, strips think blocks, Gemini 2.5 thinking_budget=0)
Texts from the code of smkrv/ha-text-ai.
Actions
- Ask Question (HA Text AI)Send a question to the AI model and receive a detailed response. This service now returns response data directly, eliminating the need for separate text sensors and the 255-character limitation. The response will also be stored in the conversation history.Fields: Instance, Question, Context Messages, System Prompt, Model, Temperature, Max Tokens, Structured Output, JSON Schema, Disable Thinking
- Clear HistoryDelete all stored questions and responses from the conversation historyFields: Instance
- Get HistoryRetrieve conversation history with optional filtering and sortingFields: Instance, Limit, Filter Model, Start Date, Include Metadata, Sort Order
- Set System PromptSet default system behavior instructions for all future conversationsFields: Instance, System Prompt
From the README
- Multi-provider support: OpenAI, Anthropic Claude, DeepSeek, Google Gemini, plus any OpenAI-compatible endpoint
- Conversation context: the model sees previous messages; depth is configurable per request (1-20)
- Response variables: ask_question returns the full response directly to the calling automation, bypassing the 255-character state limit
- Structured output: JSON responses matching a schema you provide
- Per-request overrides: model, temperature, max_tokens, system prompt, thinking mode
- Usage metrics: token counters, latency and success/error statistics as sensor attributes
- File-based history: per-instance JSON storage with automatic rotation at 1 MB
Shows in Vulpo
Chart card, Apple Watch.Information
- Installs
- 213 sharing analytics
- GitHub stars
- 85
- Connection
- Uses the vendor's cloud
- Upkeep
- Updated in the last 6 months
- Version
- v2.5.3,
- Category
- AI and voice, AI models
- Kind
- Marketplace integration
- Needs
- Needs the Marketplace (HACS on 2026.10 and older)
- Domain
ha_text_ai- Issues
- Report an issue











