All skills

Develop custom Home Assistant integrations, config flows, entities, and platforms. Use when working with manifest.json, custom components, config_flow.py, entity base classes, or device registry. Activates on keywords: integration, custom component, config flow, entity, platform, manifest.json, device_info.

Use this Skill: https://skilld.dev/gh/nodnarbnitram/claude-code-extensions/ha-integration

This session only. Nothing lands on disk.

README.md

≈1.6k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Home Assistant Integration Development

Create professional-grade custom Home Assistant integrations with complete config flows and entity implementations.

Status Production Ready
Version 1.0.0
Last Updated 2025-01-01
Confidence 5/5
Production Tested ha-integration-examples

What This Skill Does

Helps developers create professional Home Assistant integrations from scratch, including:

  • manifest.json configuration with proper dependencies and metadata
  • Config flows with user-friendly setup UI and validation
  • Entity implementation (sensors, switches, lights, etc.) with device linking
  • DataUpdateCoordinator patterns for polling external APIs
  • Device registry integration for multi-device setups
  • Async/await best practices to prevent blocking the event loop

Covers the complete integration lifecycle from initialization through entity updates and error handling.

Core Capabilities

  • Create manifest.json with all required fields and dependencies
  • Implement config flows with validation and reauth support
  • Build entity classes with proper unique_id and device_info
  • Design DataUpdateCoordinator for robust polling patterns
  • Handle async initialization and entity lifecycle
  • Integrate with device and entity registries
  • Implement proper error handling and status management

Auto-Trigger Keywords

Primary Keywords

Exact terms that strongly trigger this skill:

  • custom component
  • home assistant integration
  • config flow
  • entity implementation
  • platform development
  • manifest.json

Secondary Keywords

Related terms that may trigger in combination:

  • device registry
  • coordinator
  • sensor entity
  • switch entity
  • config entry
  • async setup

Error-Based Keywords

Common error messages that should trigger this skill:

  • "Unknown platform"
  • "Config flow validation failed"
  • "Entity already exists"
  • "Duplicate unique_id"
  • "Device not found in registry"
  • "Coordinator update failed"

Known Issues Prevention

Issue Root Cause Solution
Duplicate entities after restart Missing unique_id property Set stable unique_id from device identifier
UI freezes during setup Synchronous network calls blocking event loop Use aiohttp with async/await for all I/O
Config flow silently fails Missing try/except in validation step Wrap validation in try/except, populate errors dict
Device doesn't appear Device info missing or identifier mismatch Return consistent device_info from all entities
Entities show unavailable Coordinator errors not handled Use UpdateFailed exception in _async_update_data
Platform import errors Importing platform files in init.py Use async_forward_entry_setups for platform loading

When to Use

Use This Skill For

  • Creating new Home Assistant custom integrations/components
  • Implementing config flows with user input validation
  • Building entity classes (sensors, switches, lights, climate, etc.)
  • Setting up DataUpdateCoordinator for polling external data
  • Linking entities to device registry
  • Handling async initialization and lifecycle

Don't Use This Skill For

  • Built-in Home Assistant components (use official docs)
  • Non-integration Python packages
  • UI card development (use lovelace skill instead)
  • Automation or template development (use automations skill)

Quick Usage

# 1. Create manifest.json
{
  "domain": "my_integration",
  "name": "My Integration",
  "codeowners": ["@username"],
  "config_flow": true,
  "requirements": []
}

# 2. Create config_flow.py with validation
async def async_step_user(self, user_input=None):
    if user_input is not None:
        try:
            await self._validate_input(user_input)
        except Exception:
            return self.async_show_form(step_id="user", errors={"base": "invalid_auth"})
        return self.async_create_entry(title="...", data=user_input)

# 3. Create __init__.py with async setup
async def async_setup_entry(hass, entry):
    coordinator = MyDataUpdateCoordinator(hass, entry)
    await coordinator.async_config_entry_first_refresh()
    hass.data[DOMAIN][entry.entry_id] = coordinator
    await hass.config_entries.async_forward_entry_setups(entry, ["sensor"])
    return True

# 4. Create sensor.py with entities
class MySensor(SensorEntity):
    @property
    def unique_id(self) -> str:
        return f"{self.coordinator.data['id']}_sensor"

    @property
    def device_info(self) -> DeviceInfo:
        return DeviceInfo(identifiers={(DOMAIN, self.coordinator.data['id'])})

Token Efficiency

Approach Estimated Tokens Time
Manual Implementation 4,500 45 minutes
With This Skill 2,700 12 minutes
Savings 40% 33 minutes

File Structure

ha-integration/
├── SKILL.md        # Detailed instructions and patterns
├── README.md       # This file - discovery and quick reference
├── assets/         # Templates and boilerplate
│   ├── manifest.json
│   ├── __init__.py
│   ├── config_flow.py
│   └── coordinator.py
└── references/     # Supporting documentation
    ├── manifest-reference.md
    ├── entity-base-classes.md
    └── config-flow-patterns.md

Dependencies

Package Version Verified
homeassistant >=2024.1.0 2025-01-01
voluptuous >=0.13.0 2025-01-01
aiohttp >=3.8.0 2025-01-01 (optional)

Official Documentation

Related Skills

  • ha-dashboard - Configure Home Assistant Lovelace dashboards and cards
  • frigate-configurator - Set up Frigate NVR with Home Assistant integration

License: MIT

Source: SKILL.md on GitHub

2 warnings6mo4 checks · Risk SAFE
  • Gen Agent Trust Hub7mo

    The skill provides a standard boilerplate and comprehensive documentation for developing Home Assistant integrations. It follows official development best practices and contains no malicious patterns, obfuscation, or unauthorized data access.

  • Socket6mo

    No alerts

  • Snyk7mo

    Risk: MEDIUM · No issues

  • Runlayer7mo

    11/11 files flagged

Signed by skilld at 1ac816c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago

README badge

README badge for nodnarbnitram/claude-code-extensions/ha-integration