AI in Home Assistant (2025.8)
In the 2025.8 release, Home Assistant takes a big step forward with practical, optional AI features you can use right inside automations, scripts, sensors, and the UI. If you don't enable an AI provider, nothing changes for you. If you do, you'll get powerful new tools like AI Task and Suggest with AI buttons in the UI. The release also includes streaming text-to-speech for quicker voice replies.
Quick definitions
- AI provider: The model or service doing the "thinking" (e.g. OpenAI, local Ollama, or OpenRouter). You add these via Settings → Integrations.
- AI sub-entry: A saved configuration under an AI provider, like "Ollama (Llama 3.1 8B)" or "OpenAI (GPT-4o-mini)". You can have multiple with different models/settings.
- AI Task: A new entity/action that lets you ask AI to return structured data (not just text), which is easy to use in automations and template sensors.
- Streaming TTS: Voice replies start playing sooner instead of waiting for the whole reply to be generated. This isn't AI-specific, but when used with AI-generated responses, it makes assistants feel far more responsive.
- Suggest with AI: Optional UI buttons that draft names, descriptions, categories, and labels when saving automations/scripts.
What's new in 2025.8 (high level)
- AI Task integration: Generate text or structured data (you define the data shape) using
action: ai_task.generate_data. Works in automations, scripts, and template entities. You can attach images (e.g. from a camera) or files for the AI to analyze. - Default AI Task entity: Set one default in Settings → System → General so blueprints and your YAML don't need to specify it every time.
- Suggest with AI buttons: Turn these on in AI settings. They appear in the save dialog for automations/scripts to help you fill in meta info. (Sends the current automation/script and related names/labels to your chosen AI.)
- Streaming TTS for Home Assistant Cloud voices: Faster spoken feedback by starting playback before the whole message is generated. While not AI-specific, it greatly improves perceived speed for AI-based assistants.
- Attachments for AI: OpenAI Conversation and AI Task now support camera/image and file attachments.
- OpenRouter integration: Unified access to lots of AI models, alongside OpenAI and Ollama.
Before you start
- Install/enable at least one AI provider (OpenAI, OpenRouter, Ollama, etc.), then create one or more sub-entries (specific model/config).
- (Optional) Pick a default AI Task in Settings → System → General.
- (Optional) Enable AI suggestions if you want "Suggest with AI" buttons in the automation/script save dialog.
Why AI Task is useful
Classic AI replies are free-form text. Helpful for chatting, but awkward for automations. AI Task lets you ask the model to return a predictable JSON-like structure (numbers, booleans, simple fields), so you can use the result directly in a condition or sensor without fragile text parsing.
Example 3 - Summarise an image then announce it (with streaming TTS)
Ask AI for a quick summary of a camera snapshot, then speak it on a speaker. Streaming TTS isn't tied to AI, but it's particularly useful when reading out AI-generated content, as it starts playback before the entire message is ready.
alias: Camera snapshot summary (announce)
triggers:
- trigger: time_pattern
minutes: "/15"
actions:
- action: ai_task.generate_data
data:
task_name: Camera summary
instructions: "Describe the scene in one concise sentence."
structure:
summary:
selector:
text:
attachments:
media_content_id: media-source://camera/camera.driveway
media_content_type: image/jpeg
response_variable: ai
- action: tts.speak
target:
entity_id: tts.cloud_say # Cloud voice with streaming TTS
data:
media_player_entity_id: media_player.living_room_speaker
message: "{{ ai.data.summary | default('No summary available') }}" Suggest with AI (optional UI helper)
If enabled in AI settings, you'll see a "Suggest with AI" button when saving an automation or script. It drafts a name, description, category, and labels based on your current content and existing labels. This is optional and meant to save time - review and edit as needed.
Privacy note: Using this sends the full automation/script, plus the names of your other automations/scripts and labels, to the AI you selected. Consider a local model if that matters to you.
Tips for reliable results
- Be specific with "structure": Define only what you need (numbers, booleans, short text, or a restricted set of options). This keeps outputs predictable.
- Guard with defaults: In templates, use
| default(...)so your automation doesn't fail on an empty or unexpected response. - Use input data wisely: Provide simple inputs (e.g., a few sensor values) rather than your whole state. Smaller prompts are faster and cheaper.
- Local vs cloud: Local models (e.g., via Ollama) can be private but slower; cloud models are often quicker/better at reasoning. Mix and match for your needs.
Troubleshooting
- No AI options showing? Make sure you've added an AI provider and created at least one sub-entry.
ai_task.generate_datanot found? You're likely on an older version or the AI Task sub-entry hasn't been added yet.- Attachments ignored? Confirm your
media_content_idis valid (e.g., a camera entity via Media Source) andmedia_content_typematches (likeimage/jpeg). - Weird outputs? Tighten the
structure(e.g., use a fixed options list) and keep instructions short and goal-oriented.
Where to go next
- Try the official AI Task blueprint for camera analysis to jumpstart your setup.
- Experiment with different models (OpenRouter exposes lots) and compare speed/cost/quality.
- Use streaming TTS with long summaries or local AI to improve responsiveness on speakers.
AI in Home Assistant is strictly opt-in and designed to feel native. Use it where it saves time or reduces complexity - and keep the rest of your home running on your trusty, rule-based automations.