ha-integration-devlisted
Install: claude install-skill tonylofgren/aurora-smart-home
# Home Assistant Integration Development
Reference skill for developing Home Assistant custom integrations in Python.
## Overview
**Core principle:** Home Assistant integrations run in the same Python process as Core with full filesystem access. Security, proper async patterns, and correct timestamp handling are non-negotiable.
**Context:** This skill requires understanding the integration type (polling vs push, cloud vs local) before generating code. The DataUpdateCoordinator pattern is mandatory for most integrations.
## The Iron Law
```
TIMESTAMPS: dt_util.now() / dt_util.utcnow() - NEVER datetime.now()
ATTRIBUTES: JSON-SERIALIZABLE ONLY - NO DATACLASSES, NO DATETIME OBJECTS
ASYNC: aiohttp FOR HTTP - NEVER requests
STORAGE: entry.runtime_data - NEVER hass.data[DOMAIN]
```
The first three rules cause 90% of integration bugs. The fourth rule (`runtime_data`) is the modern pattern since HA 2024.4 - it provides type safety and cleaner lifecycle management.
## The Process
```
User request
│
▼
Clarify: API type, auth, entities
│
▼
Ask: HACS preparation?
│
▼
Select template
│
▼
Read relevant references
│
▼
Generate integration code
│
▼
Run pre-completion checklist
│
├──if HACS=yes──▶ Generate HACS files ──▶ Deliver integration
│
└──if HACS=no───▶ Deliver integration
```
## Common Pitfalls
Watch out for these Iron Law violations:
| Thought | Reality |
|---------|---------|
| "datetime.now() is fine" | WRON