Skip to content
Skills Library
Programming · Building & coding

ha-scripts

/ha-scripts

Home Assistant YAML scripts — callable, reusable action sequences with optional parameters. Use when creating a script, defining a reusable sequence, or adding parameterized fields to a script.

Licence
MIT
Last repository change
31.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 31.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Home Assistant YAML scripts — callable, reusable action sequences with optional parameters. Use when creating a script, defining a reusable sequence, or adding parameterized fields to a script.

Original author description

Home Assistant YAML scripts — callable, reusable action sequences with optional parameters. Use when creating a script, defining a reusable sequence, or adding parameterized fields to a script.

How it works

  1. YAML Style Rules
  2. Script Template
  3. Calling a Script
  4. When to Use Scripts vs Automations
  5. Related Skills
Original SKILL.md headings · 66 lines, 207 words
SKILL.md preview
---
name: ha-scripts
description: Home Assistant YAML scripts — callable, reusable action sequences with optional parameters. Use when creating a script, defining a reusable sequence, or adding parameterized fields to a script.
---

# Home Assistant YAML Scripts

Scripts are reusable, callable action sequences — unlike automations they have no trigger and must be called explicitly.

## YAML Style Rules

- **2-space indentation** (never tabs)
- **Lowercase booleans**: `true` / `false`
- **Entity IDs**: `domain.entity_name` (lowercase, underscores)

## Script Template

```yaml
script:
  morning_routine:
    alias: 'Morning Routine'
    mode: single # single | restart | queued | parallel
    fields:
      brightness:
        description: 'Light brightness percentage'
        default: 100
        selector:
          number:
            min: 0
            max: 100
    sequence:
      - action: light.turn_on
        target:
          area_id: kitchen
        data:
          brightness_pct: '{{ brightness }}'
      - delay:
          seconds: 2
      - action: media_player.play_media
        target:
          entity_id: media_player.kitchen_speaker
        data:
          media_content_id: 'media-source://...' # provider-specific media ID (e.g. spotify:playlist:..., media-source://...) — not a free-text name
          media_content_type: 'playlist'
```

## Calling a Script

```yaml
# From an automation
- action: script.morning_routine
  data:
    brightness: 80
# From the UI: Developer Tools → Actions → script.morning_routine
```

## When to Use Scripts vs Automations

| Use Case                              | Choose     |
| ------------------------------------- | ---------- |
| Triggered by an event or state change | Automation |
| Called by multiple automations        | Script     |
| Complex reusable logic                | Script     |
| One-off response to a trigger         | Automation |

## Related Skills

- Automations → `ha-yaml-automations`
- Blueprints → `ha-blueprints`

Versions

The database has no other skills named ha-scripts.

Database snapshot: 13.11.2026 · package version ea307a6d5a6b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100ha-blueprints
    Home Assistant YAML blueprints — reusable automation templates with configurable inputs. Use when building a blueprint, defining blueprint inputs, or creating a shareable automation template.
  • 100ha-configuration
    Home Assistant YAML configuration management. Use when editing configuration.yaml, setting up integrations, configuring secrets, or troubleshooting HA configuration.
  • 100homeassistant-config
    Write, fix and modernise Home Assistant YAML with current (2026) syntax — automations, scripts, scenes, template entities, blueprints, packages, configuration.yaml and dashboards. Use whenever the task touches Home Assistant config files (/config or /homeassistant,…
  • 100ha-yaml-automations
    Home Assistant YAML automations — triggers, conditions, and actions. Use when writing or fixing an automation, choosing a trigger type, or structuring automation logic.
  • 100ha-automations
    Home Assistant automation creation and management. Use when working with HA triggers, conditions, actions, scripts, scenes, or blueprints.
  • 100ha-automations
    Writes, fixes and reviews Home Assistant automations, scripts and blueprints in the syntax of the user''s version: triggers, conditions, actions, modes, waits, error handling and trace debugging. Use for "write an automation", "my automation does not fire", "blueprint", "HA script".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.