HO

home-assistant-integration-knowledge

The definitive guide for Home Assistant integration development and testing.

Install

mkdir -p .claude/skills/home-assistant-integration-knowledge && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/696" && unzip -o skill.zip -d .claude/skills/home-assistant-integration-knowledge && rm skill.zip

Installs to .claude/skills/home-assistant-integration-knowledge

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Everything you need to know to build, test and review Home Assistant Integrations. If you're looking at an integration, you must use this as your primary reference.
164 charsno explicit “when” trigger
Advanced

Key capabilities

  • Structure integration code and test files
  • Implement entity platforms using base classes
  • Manage lifecycle methods like async_added_to_hass
  • Apply integration quality scale rules
  • Configure diagnostic and repair platforms

How it works

It enforces architectural patterns and quality standards by referencing specific file structures, base class APIs, and quality scale rules for Home Assistant integrations.

Inputs & outputs

You give it
Integration development task
You get back
Compliant integration code or test

When to use home-assistant-integration-knowledge

  • Building a new home automation integration
  • Debugging existing integration logic
  • Reviewing integration code against HA standards
  • Writing tests for Home Assistant entities

About this skill

File 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:

Entity platforms

  • Ensure async_added_to_hass() and async_will_remove_from_hass() have symmetrical behavior. For example, if a subscription is created in async_added_to_hass(), it should be unsubscribed in async_will_remove_from_hass(). Also, if something is torn down in async_will_remove_from_hass(), it should be set up in async_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

Template scale file: ./script/scaffold/templates/integration/integration/quality_scale.yaml

How Rules Apply

  1. Check manifest.json: Look for "quality_scale" key to determine integration level
  2. Bronze Rules: Always required for any integration with quality scale
  3. Higher Tier Rules: Only apply if integration targets that tier or higher
  4. Rule Status: Check quality_scale.yaml in integration folder for:
    • done: Rule implemented
    • exempt: Rule doesn't apply (with reason in comment)
    • todo: Rule needs implementation

Testing Requirements

When not to use it

  • Adding scan_interval to config flows
  • Hardcoding integration names in config flows
  • Implementing library workarounds in integration code

Prerequisites

Home Assistant development environment

Limitations

  • Polling intervals are not user-configurable
  • Requires adherence to specific quality scale rules

How it compares

It mandates adherence to specific quality scale tiers and architectural constraints that are unique to the Home Assistant ecosystem.

Compared to similar skills

home-assistant-integration-knowledge side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
home-assistant-integration-knowledge (this skill)82moNo flagsAdvanced
temporal-python-testing83moNo flagsAdvanced
whart-test52moReviewBeginner
setup-web-tests11moCautionAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry