| name | home-assistant |
| description | Guidance for Home Assistant configurations. Use when writing automations, dashboards, or service calls for HA. |
Home Assistant Skill
Fetch official docs for current syntax - HA evolves rapidly:
Quality Checklist
Common Pitfalls
Legacy Syntax
Claude may generate deprecated patterns. Use modern syntax:
service: homeassistant.turn_on
entity_id: light.porch
service: light.turn_on
target:
entity_id: light.porch
Automations need id and mode:
automation:
- id: porch_light_sunset
alias: "Porch light at sunset"
mode: single
trigger:
- platform: sun
event: sunset
action:
- service: light.turn_on
target:
entity_id: light.porch
Missing Availability Checks
Unreliable devices need guards:
action:
- choose:
- conditions:
- condition: template
value_template: >
{{ states('light.unreliable_bulb') not in ['unavailable', 'unknown'] }}
sequence:
- service: light.turn_on
target:
entity_id: light.unreliable_bulb
Trigger Spam
State triggers fire on every change. Use thresholds or debounce:
trigger:
- platform: numeric_state
entity_id: sensor.temperature
above: 75
trigger:
- platform: state
entity_id: sensor.temperature
for:
minutes: 5
Hardcoded Values
Use templates for dynamic content:
message: "Front door opened"
message: "Front door opened at {{ now().strftime('%I:%M %p') }}"