Home Assistant Expert Developer
Assists with all Home Assistant development using 2024–2026 best practices. Always uses modern syntax.
Always thinks mobile-first and family-friendly. Prefers local-first solutions.
Core Principles
- Modern syntax always:
triggers: / actions: / action: (not service: / platform:)
- Local-first: prefer Ollama + home-llm over cloud LLMs where possible
- Family UX: every dashboard works on all ages, on desktop + mobile
- MCP-first AI: connect AI agents via official MCP Server (
/api/mcp)
- HACS for UI: custom cards and themes via HACS, not manual installs
Quick Orientation
| Task |
Where to look |
| MCP Server, AI integration, Assist pipeline |
reference/mcp.md |
| Automations, Blueprints, templates, API |
reference/automations.md |
| Dashboards, cards, themes, mobile |
reference/dashboards.md |
| Custom integrations, add-ons |
reference/integrations.md |
| Helper entities, reload vs restart, safe refactoring |
reference/helpers-and-ops.md |
Critical Gotchas (Read Before Generating Code)
Old syntax trap: AI often generates old HA syntax. Always convert:
service: → action: | trigger: (top) → triggers: | platform: → trigger: (inside block)
Blueprint !input in templates: expose as variables: first — {{ !input x }} never works in templates:
variables:
delay: !input delay_minutes # then use {{ delay }} in templates
Bubble Card pop-ups: MUST be placed LAST in the view YAML or they break
MCP entity visibility: only entities "Exposed" in Settings → Voice Assistants → Exposed Entities appear as MCP tools
Automation mode for motion lights: use restart (not single) so new motion resets the timer
Unavailable guard: always guard sensor templates:
{{ states('sensor.temp') not in ['unavailable','unknown'] and ... }}
MCP + stdio clients (Cursor): requires mcp-proxy bridge — official HA MCP is Streamable HTTP only
card-mod Shadow DOM: use $ to pierce shadow boundaries:
card_mod:
style:
.: |
ha-card { border-radius: 20px; }
ha-tile-icon$: |
div { color: red; }
Presence detection: use person entity + zone, not raw device_tracker
HA version gates: MCP from 2025.2+ | Sections dashboard from 2024.3+ | AI Tasks from 2025.8+
Always check user's HA version for version-gated features.
Core Architecture (Quick Reference)
homeassistant.core.HomeAssistant (hass)
├── hass.bus — Event Bus (pub/sub, fires state_changed, call_service, ...)
├── hass.states — State Machine (all entity states + attributes)
├── hass.services — Service Registry
└── Timer — fires time_changed every second (asyncio single-threaded loop)
Entity ID: <domain>.<object_id> e.g. light.living_room, sensor.temp_bedroom
Key domains: light, switch, sensor, binary_sensor, climate, media_player,
cover, person, zone, automation, script, scene, input_*, timer, counter, calendar, todo
Essential Automation Template (Always Start Here)
automation:
- id: "unique_snake_case_id"
alias: "Human Readable Name"
description: "Why this exists"
mode: single # single|restart|queued|parallel
triggers:
- trigger: state
entity_id: binary_sensor.motion_living
to: "on"
conditions:
- condition: time
after: "07:00:00"
before: "23:00:00"
actions:
- action: light.turn_on
target:
entity_id: light.living_room
data:
brightness_pct: 80
Essential Dashboard Stack
Install via HACS in this order: card-mod → lovelace-mushroom → Bubble-Card → lovelace-auto-entities → apexcharts-card
Recommended per use case:
- Family: Sections + Tile + Mushroom + Material Rounded theme
- Power user: Sections + Mushroom + card-mod + Catppuccin theme
- Tablet wall: Bubble Card bottom nav + pop-ups + Fully Kiosk Browser
Connect AI Agent to Home Assistant (MCP)
# AI Code CLI
claude mcp add --transport http --url https://<your-ha>/api/mcp home-assistant
For full MCP setup, auth, available tools, and third-party implementations → reference/mcp.md
Key Resources
1---2name: ha-dev3description: Expert Home Assistant (HA) developer skill for building automations, beautiful dashboards (desktop + mobile), AI agent integration via MCP, and custom integrations. Activates when working on Home Assistant topics: Lovelace dashboards, YAML automations, Blueprints, HACS custom cards (Mushroom, Bubble Card, card-mod), MCP/AI agent integration, custom components, ESPHome, or the Assist voice pipeline. Covers 2024–2026 HA ecosystem with modern syntax, best practices, and family-friendly UX patterns.4---56# Home Assistant Expert Developer78Assists with all Home Assistant development using 2024–2026 best practices. Always uses modern syntax.9Always thinks mobile-first and family-friendly. Prefers local-first solutions.1011## Core Principles1213- **Modern syntax always**: `triggers:` / `actions:` / `action:` (not `service:` / `platform:`)14- **Local-first**: prefer Ollama + home-llm over cloud LLMs where possible15- **Family UX**: every dashboard works on all ages, on desktop + mobile16- **MCP-first AI**: connect AI agents via official MCP Server (`/api/mcp`)17- **HACS for UI**: custom cards and themes via HACS, not manual installs1819## Quick Orientation2021| Task | Where to look |22|------|---------------|23| MCP Server, AI integration, Assist pipeline | [reference/mcp.md](reference/mcp.md) |24| Automations, Blueprints, templates, API | [reference/automations.md](reference/automations.md) |25| Dashboards, cards, themes, mobile | [reference/dashboards.md](reference/dashboards.md) |26| Custom integrations, add-ons | [reference/integrations.md](reference/integrations.md) |27| Helper entities, reload vs restart, safe refactoring | [reference/helpers-and-ops.md](reference/helpers-and-ops.md) |2829## Critical Gotchas (Read Before Generating Code)30311. **Old syntax trap**: AI often generates old HA syntax. Always convert:32 `service:` → `action:` | `trigger:` (top) → `triggers:` | `platform:` → `trigger:` (inside block)33342. **Blueprint `!input` in templates**: expose as `variables:` first — `{{ !input x }}` never works in templates:35 ```yaml36 variables:37 delay: !input delay_minutes # then use {{ delay }} in templates38 ```39403. **Bubble Card pop-ups**: MUST be placed LAST in the view YAML or they break41424. **MCP entity visibility**: only entities "Exposed" in `Settings → Voice Assistants → Exposed Entities` appear as MCP tools43445. **Automation mode for motion lights**: use `restart` (not `single`) so new motion resets the timer45466. **Unavailable guard**: always guard sensor templates:47 `{{ states('sensor.temp') not in ['unavailable','unknown'] and ... }}`48497. **MCP + stdio clients** (Cursor): requires `mcp-proxy` bridge — official HA MCP is Streamable HTTP only50518. **card-mod Shadow DOM**: use `$` to pierce shadow boundaries:52 ```yaml53 card_mod:54 style:55 .: |56 ha-card { border-radius: 20px; }57 ha-tile-icon$: |58 div { color: red; }59 ```60619. **Presence detection**: use `person` entity + `zone`, not raw `device_tracker`626310. **HA version gates**: MCP from 2025.2+ | Sections dashboard from 2024.3+ | AI Tasks from 2025.8+64 Always check user's HA version for version-gated features.6566## Core Architecture (Quick Reference)6768```69homeassistant.core.HomeAssistant (hass)70├── hass.bus — Event Bus (pub/sub, fires state_changed, call_service, ...)71├── hass.states — State Machine (all entity states + attributes)72├── hass.services — Service Registry73└── Timer — fires time_changed every second (asyncio single-threaded loop)7475Entity ID: <domain>.<object_id> e.g. light.living_room, sensor.temp_bedroom76```7778Key domains: `light`, `switch`, `sensor`, `binary_sensor`, `climate`, `media_player`,79`cover`, `person`, `zone`, `automation`, `script`, `scene`, `input_*`, `timer`, `counter`, `calendar`, `todo`8081## Essential Automation Template (Always Start Here)8283```yaml84automation:85 - id: "unique_snake_case_id"86 alias: "Human Readable Name"87 description: "Why this exists"88 mode: single # single|restart|queued|parallel89 triggers:90 - trigger: state91 entity_id: binary_sensor.motion_living92 to: "on"93 conditions:94 - condition: time95 after: "07:00:00"96 before: "23:00:00"97 actions:98 - action: light.turn_on99 target:100 entity_id: light.living_room101 data:102 brightness_pct: 80103```104105## Essential Dashboard Stack106107Install via HACS in this order: `card-mod` → `lovelace-mushroom` → `Bubble-Card` → `lovelace-auto-entities` → `apexcharts-card`108109Recommended per use case:110- **Family**: Sections + Tile + Mushroom + Material Rounded theme111- **Power user**: Sections + Mushroom + card-mod + Catppuccin theme112- **Tablet wall**: Bubble Card bottom nav + pop-ups + Fully Kiosk Browser113114## Connect AI Agent to Home Assistant (MCP)115116```bash117# AI Code CLI118claude mcp add --transport http --url https://<your-ha>/api/mcp home-assistant119```120121For full MCP setup, auth, available tools, and third-party implementations → [reference/mcp.md](reference/mcp.md)122123## Key Resources124125- Developer docs: https://developers.home-assistant.io/126- MCP Server docs: https://www.home-assistant.io/integrations/mcp_server/127- Blueprint Exchange: https://community.home-assistant.io/c/blueprints-exchange/128- Awesome HA: https://github.com/frenck/awesome-home-assistant129- Top repos: mushroom (4.8K★), Bubble-Card (4K★), ha-mcp (902★), home-llm (1.2K★), HACS (7K★)