Skip to content
Automation
Skill

/ha-delete-config

Delete an automation or script from Home Assistant via REST API with operator confirmation. Use when the operator asks to remove, delete, or disable a specific automation or script.

From plugin
claude-code-hermit
7488 skills11 agents
Install
$ npx -y skills add gtapps/claude-code-hermit --skill ha-delete-config --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/ha-delete-config

Context preview

The summary Claude sees to decide when to auto-load this skill.

Delete an automation or script from Home Assistant via REST API with operator confirmation. Use when the operator asks to remove, delete, or disable a specific automation or script.

SKILL.md

ha-delete-config.SKILL.md
name: ha-delete-config
description: Delete an automation or script from Home Assistant via REST API with operator confirmation. Use when the operator asks to remove, delete, or disable a specific automation or script.
allowed-tools:
  - Bash
  - Read

Delete HA Config

Removes an automation or script from Home Assistant via `DELETE /api/config/{domain}/config/{id}`.

Steps

1. **Identify the target**: Ask the operator which automation or script to delete (name or ID).

  • If unknown, list options: `${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha list-automations` or `ha list-scripts`.
  • The `id` column is the config ID needed for deletion. The `friendly_name` column shows the UI display name (this is HA's `friendly_name` attribute, which may differ from the YAML `alias:` field if the operator customized it via the UI).
  • The `deletable` column is `false` for YAML-packaged automations (no numeric `id`) — these cannot be removed via REST. Tell the operator to delete the YAML block from their config files and reload manually instead.

2. **Preview**: Show the target details (entity_id, id, friendly_name, state). This action cannot be undone via CLI.

3. **Delete**: Run the appropriate command:

  • `${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha delete-automation <id>` for automations.
  • `${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha delete-script <id>` for scripts.

4. **Check result**: Read the JSON output.

  • `ok: true` — config deleted. The entity stays in the registry until the next reload.
  • `ok: false, message: "Resource not found"` — the ID doesn't exist in HA (note: HA returns 400, not 404).
  • `ok: false` + other message — surface the error to the operator.

5. **Reload (optional)**: After deletion the entity stays in the registry until the next reload. Offer to trigger one:

  • Tell the operator to go to **HA Developer Tools → Services → `automation.reload`** (or `script.reload`).
  • Do **not** use `validate-apply` for this — it would also push the supplied YAML as a new config.

Safety

  • Always confirm with the operator before deleting. Deletion is immediate and removes the config from HA storage.
  • Deletion does not check for sensitive entities — the automation is already gone, there is nothing to gate.
  • After deletion, the automation will no longer fire. The entity_id remains in the registry until reload.
Read more
Ships withclaude-code-hermit

If you know Claude Tag, the idea will feel familiar: hand Claude work through a channel, such as Discord, Telegram, or your custom integration, and get results back there.

Get the whole plugin

Other skills on claude-code-hermit.