ha_list_entity_registry
List all entity registry entries from Home Assistant to view configured entities and their unique identifiers.
Instructions
List Home Assistant entity registry entries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:121-131 (handler)The tool handler for 'ha_list_entity_registry'. It calls ha.listEntityRegistry() and returns the JSON result.
server.tool( 'ha_list_entity_registry', 'List Home Assistant entity registry entries.', ListEntityRegistryInput.shape, async () => { const entities = await ha.listEntityRegistry() return { content: [{ type: 'text', text: JSON.stringify(entities, null, 2) }], } }, ) - src/ha.ts:119-121 (handler)The listEntityRegistry() method on HomeAssistantClient that makes a WebSocket call to 'config/entity_registry/list'.
async listEntityRegistry(): Promise<EntityRegistryEntry[]> { return await this.wsCall('config/entity_registry/list') } - src/ha.ts:79-85 (helper)The wsCall private helper that sends a WebSocket message (used by listEntityRegistry).
private async wsCall<T>(type: string, payload: Record<string, unknown> = {}): Promise<T> { const connection: any = await this.ensureConnected() if (typeof connection.sendMessagePromise !== 'function') throw new Error('Home Assistant connection does not support sendMessagePromise') return await connection.sendMessagePromise({ type, ...payload }) as T } - src/tools.ts:16-16 (schema)The Zod schema definition for ListEntityRegistryInput (empty object, no parameters).
export const ListEntityRegistryInput = z.object({}).strict() - src/index.ts:121-131 (registration)The tool is registered via server.tool() with name 'ha_list_entity_registry'.
server.tool( 'ha_list_entity_registry', 'List Home Assistant entity registry entries.', ListEntityRegistryInput.shape, async () => { const entities = await ha.listEntityRegistry() return { content: [{ type: 'text', text: JSON.stringify(entities, null, 2) }], } }, )