SmartHomeCopilot is a Home Assistant custom integration that analyzes your current smart-home setup and proposes actionable automation YAML with the help of cloud or local LLM providers.
It is designed as a review-first copilot: suggestions are generated against your real entities, areas, devices, and existing automations, but nothing is applied automatically without your explicit decision.
- snapshots your Home Assistant context
- builds a provider-specific AI prompt from entities, devices, areas, and automations
- returns human-readable suggestions plus ready-to-review YAML
- exposes results through sensors and persistent notifications
- supports accepting suggestions into
automations.yaml - supports cloud and local providers including OpenAI, Anthropic, Google, Groq, LocalAI, Ollama, Mistral, Perplexity, and OpenRouter
- active public integration repository
- default branch:
develop - maintained by
@fjoelnrwith@ha-llm-botas contributor/reviewer
Further maintainer context:
- The integration collects a scoped snapshot of your Home Assistant environment.
- It sends that snapshot to the configured AI provider.
- The provider response is parsed into human-readable description text and YAML suggestions.
- Suggestions are surfaced through sensors, notifications, and optional dashboard cards.
- You review, adjust, and optionally accept the automation.
Suggestions delivered directly inside Home Assistant
Dashboard surfacing both summary text and YAML suggestion content
- Open HACS.
- Add or search for
SmartHomeCopilot. - Download the integration.
- Restart Home Assistant.
- Add the integration from
Settings -> Devices & Services.
- Copy
custom_components/smart_home_copilot/into your Home Assistantcustom_components/directory. - Restart Home Assistant.
- Add the integration from
Settings -> Devices & Services.
If you use the dashboard card assets, also deploy the assets from custom_components/shc_dashboard/ into your Home Assistant frontend path as needed.
The config flow supports provider-specific credentials and settings, including:
- provider selection
- model selection
- API keys or local endpoint URLs
- max token settings
- temperature
- optional custom system prompts
For containerized setups you can inject secrets via environment variables and reference them from Home Assistant configuration.
Example:
smart_home_copilot:
openai_api_key: !env_var OPENAI_API_KEY
ollama_url: !env_var OLLAMA_URLAlternative secret file flow:
- copy
credentials.yaml.exampletocredentials.yaml - keep it out of version control
- mount it into the Home Assistant container if needed
Main service:
smart_home_copilot.generate_suggestions
Useful request parameters:
all_entitiesdomainsentity_limitcustom_prompt
Main output surface:
- suggestion sensor with description and YAML attributes
- provider status sensor
- persistent notifications inside Home Assistant
Use Python 3.11.
pip install -r requirements.txt
pip install homeassistant pytest-homeassistant-custom-component
pytest -qYou can also use the helper script:
bash scripts/setup_tests.sh
pytest -qRepository validation should keep these paths green:
hassfest- HACS validation
- Python test suite
- repo hygiene checks
- never commit provider secrets or API keys
- prefer local models if your Home Assistant snapshot data should stay fully local
- review every generated automation before applying it
MIT. See LICENSE.
Contributions are welcome. If you use an AI agent while contributing, review AGENTS.md first.
This is an independent custom component. It is not affiliated with or endorsed by Home Assistant, Nabu Casa, or any AI provider.