ha-integration-knowledge

Guide development, testing, and review of Home Assistant integrations.

90.2k|38.4k|Updated Sep 17, 2013
One-click install
npx skills add https://github.com/home-assistant/core --skill ha-integration-knowledge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ha-integration-knowledge
Source: https://github.com/home-assistant/core/tree/main/.claude/skills/ha-integration-knowledge
Command: npx skills add https://github.com/home-assistant/core --skill ha-integration-knowledge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building Home Assistant integrations requires adherence to strict architectural patterns, quality scale rules, and platform-specific guidelines that are scattered across documentation. This Skill consolidates the essential conventions for creating, testing, and reviewing integrations directly within the development workflow.

Core Features & Use Cases

  • Quality Scale Compliance: Apply bronze, silver, gold, and platinum tier rules when implementing or reviewing integration code.
  • Platform-Specific Guidance: Follow dedicated rules for diagnostics, repairs, entity lifecycle, and config flows.
  • Architectural Best Practices: Enforce thin-wrapper design, proper library separation, and symmetrical entity lifecycle methods.
  • Use Case: When reviewing a new sensor integration, use this Skill to verify it meets the bronze quality scale requirements, uses correct config flow patterns, and implements proper async_added_to_hass and async_will_remove_from_hass symmetry.

Quick Start

Review the integration in homeassistant/components/my_integration for compliance with quality scale rules and platform guidelines.

Frequently Asked Questions about ha-integration-knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Home Assistant integration from scratch?

Create a directory under homeassistant/components/<domain>/ with a manifest.json, __init__.py, and config_flow.py. Reference platinum and gold quality scale integrations as examples and follow the thin-wrapper architecture pattern.

What are the Home Assistant integration quality scale tiers?

The quality scale has bronze, silver, gold, and platinum tiers. Bronze rules are always required when quality scale is declared, while higher tiers only apply if the integration targets that level. Check quality_scale.yaml for rule status.

Can users configure polling intervals in Home Assistant integrations?

No. Polling intervals are not user-configurable in Home Assistant. Never add scan_interval, update_interval, or polling frequency options to config flows or config entries.

Why does my integration need a separate PyPI library?

Integrations should be thin wrappers around protocol parsing and device logic. Domain-specific code belongs in a separate PyPI library so it can be tested independently and reused outside Home Assistant.

How do I write tests for Home Assistant integrations?

Tests should avoid mocking internal integration details. Use the testing patterns documented at developers.home-assistant.io/docs/development_testing and place tests under tests/components/<domain>/.