
Home Assistant Automation Scripts
Draft and troubleshoot Home Assistant automations, scripts, and blueprints with ha-mcp discovery tools instead of guessing entity IDs.
Overview
home-assistant-automation-scripts is an agent skill most often used in Build integrations (also Operate infra) that drafts and troubleshoots Home Assistant automations, scripts, and blueprints via ha-mcp tooling.
Install
npx skills add https://github.com/bradsjm/hassio-addons --skill home-assistant-automation-scriptsWhat is this skill?
- Workflow: decide instance-specific vs general syntax, discover entities/services first, then minimal valid YAML or tool
- Maps ha-mcp tools for overview, search, list services, get/set automation and script, blueprints, templates, traces, log
- Points to home-assistant-best-practices for templates, helpers, modes, IDs, and refactors
- Covers triggers, conditions, actions, blueprint import, run modes, and troubleshooting patterns
- Validation path via ha_eval_template and ha_get_automation_traces
- 10+ ha-mcp tool categories mapped in the tooling section
Adoption & trust: 583 installs on skills.sh; 41 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need Home Assistant automation or script YAML but do not know valid entity IDs, services, or how to debug a failed run on your instance.
Who is it for?
Indie smart-home builders using Home Assistant with ha-mcp who want agent-assisted automations without breaking production configs.
Skip if: Users without a Home Assistant instance or ha-mcp access who only need generic YAML trivia unrelated to their setup.
When should I use this skill?
User asks for Home Assistant automation or script syntax, triggers/conditions/actions, blueprints, run modes, troubleshooting, or ha-mcp automation/script tools.
What do I get? / Deliverables
The agent discovers your HA entities and services, applies minimal automation or script changes through ha-mcp, validates templates, and uses traces or logs to fix failures.
- Automation or script YAML/config
- Blueprint-adjusted automation
- Troubleshooting notes from traces or logbook
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Most new automations are authored during Build, but the same skill supports Operate when you trace failures and adjust live config. Smart-home integrations sit under integrations—YAML automations, services, and MCP-backed config edits bridge HA to your agent workflow.
Where it fits
Create a motion-and-sunrise automation after ha_search_entities confirms the correct binary_sensor IDs.
Import a community blueprint with ha_import_blueprint and adjust inputs for your devices.
Use ha_get_automation_traces to see why a script stopped firing after a firmware update.
Validate a Jinja template with ha_eval_template before promoting a refactored automation.
How it compares
Integration skill paired with ha-mcp tools—not a standalone cloud SaaS or generic Python automation library.
Common Questions / FAQ
Who is home-assistant-automation-scripts for?
Solo homelab and indie builders running Home Assistant who want Codex, Claude Code, or Cursor to edit automations safely with MCP discovery tools.
When should I use home-assistant-automation-scripts?
During Build integrations when creating scripts or blueprints, and during Operate infra when tracing automations, validating templates, or fixing triggers after entity renames.
Is home-assistant-automation-scripts safe to install?
Review the Security Audits panel on this Prism page; the skill can drive live config changes via ha-mcp, so scope agent permissions and back up HA before applying edits.
Workflow Chain
Then invoke: home assistant best practices
SKILL.md
READMESKILL.md - Home Assistant Automation Scripts
# Home Assistant Automations & Scripts ## Workflow - Determine whether the request is instance-specific or general syntax. - Discover entities and services before drafting config. - When decisions involve templates, helpers, automation modes, entity/device IDs, or refactoring existing config, follow `home-assistant-best-practices` and its references. - Provide minimal, valid YAML/JSON or tool-driven changes. - Validate templates and troubleshoot with traces and logs. ## Tooling map (ha-mcp) - Discover entities: `ha_get_overview`, `ha_search_entities` - Discover services: `ha_list_services` - Inspect existing: `ha_config_get_automation`, `ha_config_get_script`, `ha_deep_search` - Create/update automation: `ha_config_set_automation` - Create/update script: `ha_config_set_script` - Blueprints: `ha_get_blueprint`, `ha_import_blueprint` - Validate templates: `ha_eval_template` - Troubleshoot runs: `ha_get_automation_traces`, `ha_get_logbook` - History/trends: `ha_get_history`, `ha_get_statistics` ## References All reference files are relative to the location of this SKILL.md file. - Best practices: `home-assistant-best-practices` (see its `references/automation-patterns.md`, `references/template-guidelines.md`, `references/helper-selection.md`, `references/device-control.md`, `references/safe-refactoring.md`) - Limited templates: `references/LIMITED_TEMPLATES.md` - Debug workflows: `references/DEBUG_WORKFLOWS.md` - Template entities: `references/TEMPLATE_ENTITY_GUIDE.md` - Additional notes: `references/REFERENCE.md` # Home Assistant Automations & Scripts Reference ## Primary documentation - Automations overview: https://www.home-assistant.io/docs/automation/ - Automation triggers: https://www.home-assistant.io/docs/automation/trigger/ - Automation conditions: https://www.home-assistant.io/docs/automation/condition/ - Automation actions: https://www.home-assistant.io/docs/automation/action/ - Automation templating: https://www.home-assistant.io/docs/automation/templating/ - Templating (Jinja + limited templates): https://www.home-assistant.io/docs/configuration/templating/ - State object model: https://www.home-assistant.io/docs/configuration/state_object/ - Automation run modes: https://www.home-assistant.io/docs/automation/modes/ - Automation actions (services): https://www.home-assistant.io/docs/automation/services/ - Troubleshooting automations: https://www.home-assistant.io/docs/automation/troubleshooting/ - Automation YAML: https://www.home-assistant.io/docs/automation/yaml/ - Scripts: https://www.home-assistant.io/docs/scripts/ - Script actions: https://www.home-assistant.io/docs/scripts/perform-actions/ - Script conditions: https://www.home-assistant.io/docs/scripts/conditions/ - Blueprints overview: https://www.home-assistant.io/docs/blueprint/ - Blueprint schema: https://www.home-assistant.io/docs/blueprint/schema/ - Blueprint selectors: https://www.home-assistant.io/docs/blueprint/selectors/ - Template integration: https://www.home-assistant.io/integrations/template ## Repo anchors (home-assistant/home-assistant.io) - source/_docs/automation/ - source/_docs/automation/trigger.markdown - source/_docs/automation/condition.markdown - source/_docs/automation/action.markdown - source/_docs/automation/templating.markdown - source/_docs/automation/modes.markdown - source/_docs/automation/services.markdown - source/_docs/automation/troubleshooting.markdown - source/_docs/automation/yaml.markdown - source/_docs/scripts.markdown - source/_docs/scripts/perform-actions.markdown - source/_docs/scripts/conditions.markdown - source/_docs/blueprint.markdown - source/_docs/blueprint/schema.markdown - source/_docs/blueprint