Install
$ agentstack add skill-narrowstacks-claude-homeassistant-plugins-homeassistant-config ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Home Assistant Configuration
Create and manage Home Assistant configuration files with proper YAML syntax, automations, scripts, and templates.
When to Use This Skill
Use when working with:
- Main configuration.yaml files and includes
- Automations (triggers, conditions, actions)
- Scripts with parameters
- Jinja2 templates and template sensors
- File organization and splitting
- YAML syntax validation
- Home Assistant troubleshooting
Core YAML Rules
Critical syntax requirements:
- Indentation: 2 spaces per level (never tabs)
- Lists: Start with
-at same indentation - Strings: Quote 'on', 'off', 'yes', 'no' to avoid boolean conversion
- Case sensitive: 'on' ≠ 'On' ≠ 'ON'
- Comments: Use
#
Example structure:
automation:
- alias: "Descriptive Name"
triggers:
- trigger: state
entity_id: sensor.example
actions:
- action: light.turn_on
File Organization
Basic Includes
# configuration.yaml
automation: !include automations.yaml
script: !include scripts.yaml
sensor: !include sensors.yaml
Directory Includes
# Merge as list (files start with -)
automation: !include_dir_list automations/
sensor: !include_dir_merge_list sensors/
# Merge as named dict
script: !include_dir_merge_named scripts/
Secrets Management
Store sensitive data in secrets.yaml (add to .gitignore):
# secrets.yaml
api_key: "abc123"
# configuration.yaml
platform: service
api_key: !secret api_key
Automations
Current Syntax (2024+)
- alias: "Name"
triggers:
- trigger: [type]
conditions:
- condition: [type]
actions:
- action: [service]
Common Triggers
State: trigger: state with entity_id, from, to, for Time: trigger: time with at Numeric: trigger: numeric_state with above/below Sun: trigger: sun with event: sunset/sunrise Template: trigger: template with value_template
Common Actions
Service call:
- action: light.turn_on
target:
entity_id: light.bedroom
data:
brightness: 255
Delay: delay: "00:05:00" or delay: {minutes: 5}
Conditional:
- if:
- condition: state
entity_id: light.bedroom
state: "on"
then:
- action: light.turn_off
Repeat:
- repeat:
count: 5
sequence:
- action: light.toggle
Modes
single: Don't run if already running (default)restart: Restart when triggered againparallel: Run multiple instances (addmax: 10)queued: Queue runs (addmax: 5)
Scripts
Basic Structure
script_name:
alias: "Friendly Name"
mode: single
fields:
param_name:
description: "What this does"
required: true
selector:
text:
sequence:
- action: service_name
data:
param: "{{ param_name }}"
Calling Scripts
# From automation
actions:
- action: script.script_name
data:
param_name: "value"
Jinja2 Templates
Basic Syntax
{{ states('sensor.temperature') }}
{{ state_attr('light.bedroom', 'brightness') }}
{{ is_state('light.bedroom', 'on') }}
Common Functions
{{ now() }}
{{ now().hour }}
{{ states('sensor.temp') | float(0) }}
{{ states('sensor.name') | lower }}
Conditionals
{% if is_state('light.bedroom', 'on') %}
Light is on
{% else %}
Light is off
{% endif %}
Loops and Filters
{{ states.light | selectattr('state', 'eq', 'on') | list | count }}
Template Sensors
template:
- sensor:
- name: "Sensor Name"
state: >
{{ states('sensor.input') | float * 2 }}
Validation and Testing
Before restarting:
- Developer Tools > YAML > Check Configuration
- Review errors/warnings
- Fix issues
Test templates: Developer Tools > Template (live preview)
Debug logging:
logger:
default: info
logs:
homeassistant.components.automation: debug
Common Patterns
For detailed automation patterns (motion lighting, presence detection, security, climate control, etc.), see [references/patterns.md](references/patterns.md)
For template sensor examples (calculations, averaging, counting, etc.), see [references/templates.md](references/templates.md)
For troubleshooting specific errors, see [references/troubleshooting.md](references/troubleshooting.md)
For best practices and optimization, see [references/best-practices.md](references/best-practices.md)
Example Files
Complete working examples in examples/:
config.yaml- Main configuration with includesautomations.yaml- 25+ automation patternsscripts.yaml- 15+ script examplestemplates.yaml- 30+ template sensorssecrets.yaml- Secrets file structure
Quick Troubleshooting
Tab character error: Replace tabs with 2 spaces
Boolean issue: Quote 'on', 'off', 'yes', 'no' as strings
Template error: Test in Developer Tools > Template, use | float(0) for defaults
Entity not found: Check exact entity_id in Developer Tools > States
Automation not triggering: Enable debug logging, verify entity exists, check conditions
Instructions for Claude
When helping with Home Assistant configuration:
- Use current syntax (triggers/actions not trigger/service)
- Always include proper indentation (2 spaces)
- Quote boolean-like strings ('on', 'off', etc.)
- Provide complete, working examples
- Test templates for validity
- Add comments for complex logic
- Handle unavailable states with
| float(0)or checks - Suggest validation before deployment
- Reference example files for complete patterns
- Load reference files as needed for detailed guidance
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: narrowstacks
- Source: narrowstacks/claude-homeassistant-plugins
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.