Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

ai_automation_suggester

> 设计协作
Open source

This custom Home Assistant integration automatically scans your entities, detects new devices, and uses AI (via cloud and local APIs) to suggest tailored automa

763 stars0 likes1 views
WebsiteGitHub

About

This custom Home Assistant integration automatically scans your entities, detects new devices, and uses AI (via cloud and local APIs) to suggest tailored automa

AI Automation Suggester

An AI‑powered assistant for Home Assistant that leverages large language models to understand your unique smart home environment – your entities, areas, devices, and existing automations. It proposes intelligent, actionable YAML suggestions tailored to your specific setup, helping you unlock your home's full potential.


✨ Why does this exist? (Purpose and Problem Statement)

As your Home Assistant setup grows, managing its complexity and identifying new opportunities for automation can become challenging. You might find yourself with:

  • Too many possibilities: Every new device adds countless potential interactions.
  • Automation "Writer's Block": Translating a complex idea into functional YAML can be daunting.
  • Underutilized Potential: Many devices sit idle or require manual control because the right automation hasn't been thought of or created.
  • Maintenance Overload: Keeping existing automations relevant as your home evolves is difficult.

The result is often an under-automated house despite having powerful hardware.

The Fix – Your Personal Automation Copilot

The AI Automation Suggester integration solves these challenges by acting as a personal automation consultant. It intelligently analyzes your Home Assistant instance to:

  1. Analyze your home's state: Understand your devices, their capabilities, locations, and existing automations.
  2. Identify opportunities: Spot gaps, synergies, and potential improvements for energy saving, security, comfort, and convenience.
  3. Draft ready-to-paste YAML: Provide concrete, tailored automation ideas as YAML snippets you can review, tweak, and implement directly.

In essence, this integration turns the complexity of a large Home Assistant environment into actionable insights and tangible benefits, guiding you toward a more efficient, comfortable, and secure smart home.


How It Works (The Solution)

The integration follows a simple, effective process:

Step What happens? Details
1 · Snapshot Collects data about your home. On manual trigger or schedule, the integration gathers information on your entities (including attributes), devices, areas, and existing automations. You can control the scope using filters and limits.
2 · Prompt Building Structures the data for the AI. This snapshot is embedded into a detailed system prompt describing your specific Home Assistant setup. You can enhance this with a custom prompt to steer suggestions towards specific goals (e.g., "focus on presence lighting").
3 · Provider Call Sends the prompt to the AI. The crafted prompt is sent to your configured AI provider (OpenAI, Azure OpenAI, Anthropic, Google, Groq, LocalAI, Ollama, Mistral, Perplexity, OpenRouter, Requesty, MiniMax, LiteLLM, or another OpenAI-compatible endpoint).
4 · Parsing Processes the AI's response. The integration asks capable providers for structured JSON, falls back to fenced YAML parsing, validates returned YAML, and records warnings for missing or possibly truncated output.
5 · Surface Delivers and stores the suggestions. Suggestions appear as Home Assistant persistent notifications, sensor attributes, and stored history that can be used by the bundled dashboard card or your own cards.

Randomized entity selection (configurable) helps ensure each analysis run can surface fresh ideas rather than repeating the same suggestions.


What to Expect (Screenshots)

Suggestions are delivered directly within Home Assistant notifications:

    AI suggestions delivered right inside Home Assistant

You can also build custom dashboard cards to display suggestions using sensor attributes:

    Dashboard showing human-readable description and extracted YAML block

Here's an example of displaying suggestions on a dashboard:

    Example of a dashboard displaying AI-suggested automations


Benefits

Leveraging the AI Automation Suggester provides several key benefits:

  • Time Saving: Reduces the effort and guesswork involved in designing complex automations.
  • Context-Aware Suggestions: Ideas consider your specific devices, areas, and current setup for realistic, tailored recommendations.
  • Model-Agnostic Flexibility: Supports cloud and local AI models, letting you choose based on cost, privacy, and performance preferences.
  • Improved Usability: Makes automation creation more accessible, even for users less familiar with YAML.
  • Dynamic Inspiration: Provides fresh ideas as your home and devices change, keeping your automations evolving.
  • Enhanced Control: Custom prompts, entity limits, and domain filters give you command over the suggestion generation process.
  • Safe to Try: Suggestions are presented for review; nothing is automatically implemented without your explicit action.

Features

  • Multi-Provider Support: Connect to OpenAI, OpenAI Azure, Anthropic, Google, Groq, LocalAI, Ollama, Mistral, Perplexity, OpenRouter, Requesty, MiniMax, or LiteLLM (100+ backends) with full configuration options:
    • Temperature control for all providers (0.0 - 2.0)
    • Model selection with provider-specific defaults
    • Secure API key storage
    • Custom endpoints for compatible providers
    • Ollama's Disable Think option sends native think: false and the legacy /no_think prompt hint. Leaving it off preserves the model's default thinking behavior.
  • Customizable Prompts and Filters: Tailor suggestions using system prompts, domain filters, and entity limits.
  • Persistent Suggestion History: Retain recent suggestions with provider/model metadata, review status, warnings, and generated YAML.
  • Review Actions: Mark stored suggestions as accepted, declined, or dismissed through services or the bundled dashboard card.
  • Randomized Entity Selection: Prevent repetitive suggestions and discover new opportunities.
  • Context-Rich Insights: Incorporates device and area information for smarter, more relevant ideas.
  • Persistent Notifications: Receive suggestions directly in your Home Assistant interface.
  • Service Call Integration: Manually trigger suggestions via the ai_automation_suggester.generate_suggestions service with full parameter control.
  • Diagnostics Sensors: Monitor suggestion status and provider connection health.
  • Example Automations: Includes built-in examples for new entity detection and weekly reviews. - This is found in the code base
  • Dashboard-Friendly Output: Sensor attributes provide description and YAML blocks ready for Lovelace cards.

️ Prerequisites

  • Home Assistant: Version 2024.1 or later.
  • AI Provider Setup: You will need access to an AI model.
    • For cloud providers (OpenAI, Anthropic, Google, Groq, Mistral, Perplexity, OpenRouter, Requesty, MiniMax), you will need API keys.
    • For local models (LocalAI, Ollama), ensure the local servers are running and accessible from Home Assistant.

⬇️ Installation

HACS (Recommended)

  1. Install HACS if you haven't already.
  2. In HACS → Integrations, click the + button.
  3. Search for AI Automation Suggester.
  4. Select the integration and click Download.
  5. Restart Home Assistant.
  6. Go to Settings → Devices & Services → + Add Integration and search for AI Automation Suggester.

When a GitHub release is published, HACS can detect the new version and show it as an available update. Update through HACS, then restart Home Assistant so the custom integration is reloaded.

Manual Installation

  1. Download the contents of this repository.
  2. Copy the custom_components/ai_automation_suggester folder to your Home Assistant custom_components directory.
    bash
    /
    └── custom_components/
        └── ai_automation_suggester/
            ├── __init__.py
            └── ... (other files)
  3. Restart Home Assistant.
  4. Go to Settings → Devices & Services → + Add Integration and search for AI Automation Suggester.

⚙️ Configuration

  1. Add the integration via the Home Assistant UI: Settings → Devices & Services → + Add Integration → AI Automation Suggester.
  2. Follow the setup wizard:
    • Select your AI Provider: Choose from the dropdown list.
    • Enter API Keys or Endpoint: Provide the necessary credentials or local server URL based on your provider choice.
    • Select Model: Choose the specific model variant you wish to use.
    • Set Max Tokens: Define the maximum length for the AI's response (influences the length of suggestions).
    • (Optional) Custom System Prompt: Provide an initial prompt to guide the AI's overall perspective (e.g., "You are an expert in energy-saving automations for smart homes.").

You can adjust these settings later via the integration options in Settings → Devices & Services.


️ Advanced Configuration

Global Settings

  • Temperature Control:

    • Available for all providers
    • Range: 0.0 (more focused) to 2.0 (more creative)
    • Default: 0.7
    • Configurable in both initial setup and options
  • Token Management:

    • Separate input/output token limits
    • Prevents excessive API usage
    • Optimizes response length
    • Defaults remain 500 tokens per budget for compatibility. For reasoning models or missing/truncated YAML, try 16000 input tokens and 4096 output tokens with a small entity limit, then adjust within your model's limits.
    • Reasoning may consume output tokens before the final YAML is produced. Higher limits can increase usage and cost. Limits are ceilings, not measurements of billed tokens. Check your provider's usage dashboard and current pricing.
  • History and Filtering:

    • Persistent custom system prompt
    • Excluded domains, entities, and areas
    • Stored suggestion history retention
    • Provider request timeout for slow local or research models, in seconds. Default: 900. Minimum: 10. There is no maximum, so 7200 allows a two-hour request. Zero does not disable the timeout.

Supported Providers and Model Notes

Model APIs change quickly, so the integration keeps a compatibility catalog and still allows custom model names. Existing configured model values are preserved on upgrade.

Provider New default for new configs Compatibility notes
OpenAI gpt-5.4-mini GPT-5-style models use the Responses API, max_output_tokens, and reasoning effort. Temperature is not sent to models known to reject it. gpt-5.5 and gpt-5.5-pro are supported when available on your account.
Azure OpenAI gpt-5.4-mini deployment name Azure uses deployment names. Configure the deployment ID, endpoint, and API version that match your Azure resource.
Anthropic claude-sonnet-4-6 Supports current Claude Sonnet/Opus model IDs such as claude-sonnet-4-6 and claude-opus-4-7.
Google Gemini gemini-3.5-flash Stable replacement for Gemini 2.5 Flash, which is unavailable to new users. Custom model IDs are still allowed.
Groq openai/gpt-oss-120b Replaces llama-3.3-70b-versatile, retired for free/developer accounts on 2026-08-16. openai/gpt-oss-20b is another production option. qwen/qwen3.6-27b is a preview alternative. Enterprise Llama access may remain.
Mistral AI mistral-small-latest Supports current *-latest aliases and custom published IDs.
Perplexity AI sonar Supports Sonar, Sonar Pro, reasoning, and research-style model IDs where your account has access.
OpenRouter openai/gpt-5.4-mini OpenRouter remains dynamic. Use provider-prefixed IDs from OpenRouter's model catalog.
Requesty openai/gpt-4o-mini OpenAI-compatible router (https://router.requesty.ai) providing 300+ mod

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonaiautomatic-suggestionsautomationsbuilder-design-pattern

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category设计协作
PricingOpen source

> Related tools

F
Figma
协作式界面设计工具
S
sketch-wakatime
Sketch plugin for automatic time tracking and metrics generated from your Sketch usage.
Q
QuickColor
Quickly apply fills from the global or document color palettes to selected elements - 🎨