
Home Assistant Integration Knowledge
FreeYour essential guide to Home Assistant integrations.
Free · Opens the source repo
What Home Assistant Integration Knowledge does
The Home Assistant Integration Knowledge skill provides comprehensive guidance for developers working on Home Assistant integrations. It serves as a primary reference for building, testing, and reviewing integrations, ensuring that developers adhere to the best practices and guidelines established by the Home Assistant community. This skill is particularly useful for those looking to create high-quality integrations that meet the standards set by the integration quality scale.
The skill includes detailed information on file locations for integration code and tests, as well as general guidelines that must be followed during the development process. Developers are encouraged to prioritize integrations with higher quality scale levels when seeking examples. The skill emphasizes the importance of maintaining a clean and efficient integration structure, advocating for thin wrappers and proper separation of concerns between integration logic and underlying libraries.
Additionally, the skill outlines specific rules for entity platforms, ensuring that developers implement symmetrical behavior in their integration methods. It also provides insights into the integration quality scale, guiding developers on how to validate their integrations against established criteria. By following these guidelines, developers can contribute to a robust ecosystem of Home Assistant integrations that enhance user experience and functionality.
Whether you are a seasoned developer or just starting with Home Assistant, this skill equips you with the necessary knowledge to create integrations that are not only functional but also adhere to community standards. With clear instructions and best practices at your fingertips, you can streamline your development process and improve the quality of your contributions to the Home Assistant platform.
When to use it
Use this skill when developing or reviewing Home Assistant integrations to ensure compliance with community standards.
When not to use it
This skill is not suitable for general programming tasks outside the context of Home Assistant integrations.
What you can build with it
Building a New Integration
When starting a new integration, refer to this skill for guidelines on structure and best practices.
Reviewing Existing Integrations
Use this skill to ensure that existing integrations meet the quality scale requirements before deployment.
Testing Integration Functionality
Leverage the testing guidelines provided to validate the functionality of your Home Assistant integrations.
How to install Home Assistant Integration Knowledge
View source1. Install with the skills CLI
npx skills add home-assistant/core/ha-integration-knowledge --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by home-assistantFile Locations
- Integration code:
./homeassistant/components/<integration_domain>/ - Integration tests:
./tests/components/<integration_domain>/
General guidelines
- When looking for examples, prefer integrations with the platinum or gold quality scale level first.
- Polling intervals are NOT user-configurable. Never add scan_interval, update_interval, or polling frequency options to config flows or config entries.
- Do NOT allow users to set config entry names in config flows. Names are automatically generated or can be customized later in UI. Exception: helper integrations may allow custom names.
- For entity actions and entity services, avoid requesting redundant defensive checks for fields already enforced by Home Assistant validation schemas and entity filters; only request extra guards when values bypass validation or are transformed unsafely.
- When validation guarantees a key is present, prefer direct dictionary indexing (
data["key"]) over.get("key")so invalid assumptions fail fast. - Integrations should be thin wrappers. Protocol parsing, device state machines, or other domain logic belong in a separate PyPI library, not in the integration itself. If unsure, ask before inlining.
- Integrations should not implement fixes or workarounds for limitations in libraries. Instead, the library should be updated to fix the issue.
The following platforms have extra guidelines:
- Diagnostics:
platform-diagnostics.mdfor diagnostic data collection - Repairs:
platform-repairs.mdfor user-actionable repair issues
Entity platforms
- Ensure
async_added_to_hass()andasync_will_remove_from_hass()have symmetrical behavior. For example, if a subscription is created inasync_added_to_hass(), it should be unsubscribed inasync_will_remove_from_hass(). Also, if something is torn down inasync_will_remove_from_hass(), it should be set up inasync_added_to_hass(). - Entity base class (e.g.
SensorEntity,TrackerEntity) provide a stable API for child classes to inherit from. Do not suggest redeclaring or duplicating attributes, properties, or methods the base class already provides, and do not add guards against the parent's behavior changing — rely on the base class instead.
Integration Quality Scale
- When validating the quality scale rules, check them at https://developers.home-assistant.io/docs/core/integration-quality-scale/rules
- When implementing or reviewing an integration, always consider the quality scale rules, since they promote best practices.
Template scale file: ./script/scaffold/templates/integration/integration/quality_scale.yaml
How Rules Apply
- Check
manifest.json: Look for"quality_scale"key to determine integration level - Bronze Rules: Always required for any integration with quality scale
- Higher Tier Rules: Only apply if integration targets that tier or higher
- Rule Status: Check
quality_scale.yamlin integration folder for:done: Rule implementedexempt: Rule doesn't apply (with reason in comment)todo: Rule needs implementation
Testing Requirements
- Tests should avoid interacting or mocking internal integration details. For more info, see https://developers.home-assistant.io/docs/development_testing/#writing-tests-for-integrations
Frequently asked questions about Home Assistant Integration Knowledge
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
