New advertisers: 50% off your first month with code FIRSTMONTHSee slots
laurigates avatar

home-assistant-plugin

Home Assistant YAML plugin that edits configs, automations, and entities with validation built in.

version
1.4.1
GitHub stars
60
View on GitHub

What it does

  • Adds 4 skills (ha-configuration, ha-automations, ha-entities, ha-validate) covering YAML, automations, and entity management
  • Covers include directives, !secret references, packages, template sensors, scripts, scenes, and groups
  • Includes a /ha:validate command that checks syntax, undefined secrets, and duplicate keys before you reload
  • Designed for Home Assistant users who keep their setup in version-controlled configuration files

Home Assistant configuration management - YAML configuration, automations, scripts, scenes, and entity management for Home Assistant installations

Add marketplace

/plugin marketplace add laurigates/claude-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install home-assistant-plugin@laurigates-claude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Home Assistant Automations

When to Use This Skill

Use this skill when...Use ha-configuration instead when...
Creating automation rulesEditing configuration.yaml
Writing triggers/conditions/actionsSetting up integrations
Working with scripts and scenesManaging secrets
Using blueprintsOrganizing packages
Device trigger setupGeneral YAML configuration

Automation Structure

automation:
  - id: "unique_automation_id"
    alias: "Descriptive Name"
    description: "What this automation does"
    mode: single  # single, restart, queued, parallel

    trigger:
      - platform: state
        entity_id: binary_sensor.motion
        to: "on"

    condition:
      - condition: time
        after: "08:00:00"
        before: "22:00:00"

    action:
      - service: light.turn_on
        target:
          entity_id: light.living_room

Trigger Types

State Triggers

trigger:
  # Basic state change
  - platform: state
    entity_id: binary_sensor.door
    to: "on"
    from: "off"

  # With duration
  - platform: state
    entity_id: binary_sensor.motion
    to: "off"
    for:
      minutes: 5

  # Attribute change
  - platform: state
    entity_id: climate.thermostat
    attribute: current_temperature

Time Triggers

trigger:
  # Specific time
  - platform: time
    at: "07:00:00"

  # Input datetime
  - platform: time
    at: input_datetime.alarm_time

  # Time pattern (every hour)
  - platform: time_pattern
    hours: "*"
    minutes: 0
    seconds: 0

  # Every 15 minutes
  - platform: time_pattern
    minutes: "/15"

Other trigger types (numeric state, sun, device, event, webhook, template, zone) are documented in REFERENCE.md.

Condition Types

State Conditions

condition:
  # Single entity
  - condition: state
    entity_id: binary_sensor.door
    state: "off"

  # Multiple states allowed
  - condition: state
    entity_id: alarm_control_panel.home
    state:
      - armed_home
      - armed_away

  # Check for duration
  - condition: state
    entity_id: binary_sensor.motion
    state: "off"
    for:
      minutes: 10

Time Conditions

condition:
  # Time range
  - condition: time
    after: "08:00:00"
    before: "22:00:00"

  # Weekdays only
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri

  # Combined
  - condition: time
    after: "09:00:00"
    before: "17:00:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri

Other condition types (numeric state, sun, template, zone, logical, shorthand) are documented in REFERENCE.md.

Action Types

Service Calls

action:
  # Basic service call
  - service: light.turn_on
    target:
      entity_id: light.living_room
    data:
      brightness_pct: 80
      color_temp: 350

  # Multiple targets
  - service: light.turn_off
    target:
      entity_id:
        - light.bedroom
        - light.bathroom
      area_id: upstairs

Delays and Waits

action:
  - service: light.turn_on
    target:
      entity_id: light.living_room

  # Fixed delay
  - delay:
      seconds: 30

  # Wait for trigger
  - wait_for_trigger:
      - platform: state
        entity_id: binary_sensor.motion
        to: "off"
    timeout:
      minutes: 5
    continue_on_timeout: true

  # Wait for template
  - wait_template: "{{ is_state('light.bedroom', 'off') }}"
    timeout: "00:05:00"

If/Then/Else (Modern)

action:
  - if:
      - condition: state
        entity_id: binary_sensor.motion
        state: "on"
    then:
      - service: light.turn_on
        target:
          entity_id: light.hallway
    else:
      - service: light.turn_off
        target:
          entity_id: light.hallway

For advanced action patterns (choose, repeat, variables, parallel execution), scripts, scenes, and common automation patterns, see REFERENCE.md.

Automation Modes

ModeBehavior
singleIgnore new triggers while running
restartStop current run, start new
queuedQueue up to max runs
parallelRun up to max in parallel
automation:
  - alias: "Motion Light"
    mode: restart
    max: 10  # For queued/parallel
    max_exceeded: silent  # silent, warning, error

Agentic Optimizations

ContextCommand
Find automationgrep -r "alias:" config/automations.yaml
Find triggersgrep -r "platform: state" config/ --include="*.yaml"
List scriptsgrep -r "^ [a-z_]*:" config/scripts.yaml
Find scenesgrep -r "^ - name:" config/scenes.yaml
Check automation IDsgrep -r "^ - id:" config/automations.yaml

Readme

Home Assistant Plugin

Home Assistant configuration management for Claude Code - YAML configuration, automations, scripts, scenes, and entity management.

Overview

This plugin provides skills and commands for managing Home Assistant installations through configuration files. It covers:

  • Core YAML configuration patterns
  • Automation rules, triggers, conditions, and actions
  • Entity management and customization
  • Template entities and sensors
  • Scripts, scenes, and groups
  • Configuration validation

Skills

SkillDescription
ha-configurationCore YAML configuration, secrets, packages, integrations
ha-automationsAutomation rules, triggers, conditions, actions, scripts, scenes
ha-entitiesEntity domains, device classes, customization, template entities
ha-validateValidate YAML configuration files for syntax and structure errors

Usage Examples

Configuration Management

Ask Claude to help with:

  • "Add MQTT configuration to my Home Assistant setup"
  • "Create a package for climate control"
  • "Set up secrets management for my API keys"
  • "Configure the recorder to exclude noisy entities"

Automation Creation

Ask Claude to help with:

  • "Create a motion-activated light automation"
  • "Set up a presence-based thermostat automation"
  • "Write an automation that sends notifications when the door is left open"
  • "Create a sunrise/sunset based lighting automation"

Entity Management

Ask Claude to help with:

  • "Create a template sensor for average indoor temperature"
  • "Set up a binary sensor to detect if anyone is home"
  • "Configure entity customizations for my lights"
  • "Create a group for all downstairs lights"

Validation

/ha:validate
/ha:validate /path/to/config

Configuration File Structure

config/
├── configuration.yaml      # Main configuration
├── secrets.yaml           # Sensitive values
├── automations.yaml       # Automation rules
├── scripts.yaml           # Reusable scripts
├── scenes.yaml            # Scene definitions
├── customize.yaml         # Entity customizations
└── packages/              # Modular configuration
    ├── climate.yaml
    ├── presence.yaml
    └── notifications.yaml

Key Concepts

Include Directives

DirectiveUsage
!include file.yamlInclude single file
!include_dir_named packages/Include directory as named mappings
!include_dir_merge_list automations/Merge directory into list
!secret key_nameReference from secrets.yaml

Automation Structure

automation:
  - alias: "Example"
    trigger:
      - platform: state
        entity_id: binary_sensor.motion
        to: "on"
    condition:
      - condition: time
        after: "08:00:00"
        before: "22:00:00"
    action:
      - service: light.turn_on
        target:
          entity_id: light.living_room

Template Sensors

template:
  - sensor:
      - name: "Average Temperature"
        unit_of_measurement: "°C"
        state: >-
          {{ (states('sensor.room1') | float +
              states('sensor.room2') | float) / 2 }}

Installation

/plugin install home-assistant-plugin@laurigates-claude-plugins

License

MIT

Details

Marketplace
laurigates/claude-plugins
Source
home-assistant-plugin
Author
Lauri Gates
Category
Development
License
MIT
Keywords
home-assistant, smart-home, yaml-configuration, automations, scripts, scenes, entities, integrations, blueprints, iot
Listed since
Apr 7, 2026

More from laurigates/claude-plugins

All 52

Similar to home-assistant-plugin

More Workflow Automation