Remove Entity
ha_remove_entityRemoves one or more entities from the Home Assistant entity registry to clean up orphaned or stale entries, including bulk deletion of up to 100 IDs at once.
Instructions
Remove one or more entities from the Home Assistant entity registry.
Permanently removes the entity registration; the entity will no longer appear in the UI or be available to automations. Use only for orphaned or stale entity entries: if the underlying device, integration or stored helper is still there, the entity may be re-added on the next HA restart or reload; for a stored helper's entity a single-id removal names the tool that removes the helper. Added again, it gets back its registry settings while its config entry exists, and for 30 days after that entry, or an entity without one, was removed. For most use cases, consider disabling instead: ha_set_entity(entity_id="sensor.old", enabled=False).
BULK MODE: Pass a list of entity IDs to remove up to 100 at once — handy for clearing the restored=true orphans an integration leaves behind after its filters change. Removals run sequentially and return: {removed: [...], skipped: [...], errors: [{entity_id, code, message}]} where skipped = ids already absent (not-found is idempotent). A lost connection stops the run; not_attempted lists the ids never sent (the failing one too if it never left), safe to retry. Only single-id removal is auto-backed-up.
EXAMPLES:
Remove orphaned sensor: ha_remove_entity("sensor.old_temperature")
Bulk cleanup: ha_remove_entity(["sensor.orphan_1", "sensor.orphan_2"])
Use ha_search / ha_get_entity to verify an entity before removing it.
If a Claude Desktop user gets a 4-minute timeout with no result on this call, read the target back before repeating it, and tell them to wait a few seconds before clicking the manual-approve button, as clicking it too quickly is known to cause hangs in Claude Desktop. This workaround is specific to Claude Desktop.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entity_id": "<entity_id>"
},
"name": "ha_remove_entity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | Entity ID, or a list of entity IDs, to remove from the entity registry (e.g., 'sensor.old_temperature'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||