Remove Entity
ha_remove_entityPermanently delete orphaned or stale entities from the Home Assistant registry, in single or bulk mode, to clear entries no longer used by the UI or automations.
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 or integration is still active, the entity may be re-added automatically on the next HA restart or reload. This cannot be undone without restoring from backup. 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, not an error). Bulk mode is NOT auto-backed-up (the snapshot is single-entity); single-id removal still is.
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.
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 | |||