Inspect for n8n and Home Assistant
Both read through the shared HTTP helper but were missing from the web list of inspectable kinds, so no Inspect button showed. Home Assistant's reader was named listEntities, which the inspect route doesn't recognise; it now also answers to read. Test and INTEGRATIONS.md updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8ffae62281
commit
386d77b351
4 files changed
+36
-4
No files matched your search
@@ -34,6 +34,8 @@ export interface HaEntity {
|
||||
export interface HomeAssistantAdapter {
|
||||
ping(): Promise<{ ok: boolean; latencyMs?: number; error?: string }>;
|
||||
listEntities(): Promise<HaEntity[]>;
|
||||
/** The same read under the name the inspector looks for. */
|
||||
read(): Promise<HaEntity[]>;
|
||||
}
|
||||
|
||||
const obj = (v: unknown): Record<string, unknown> => (v !== null && typeof v === "object" && !Array.isArray(v) ? (v as Record<string, unknown>) : {});
|
||||
@@ -87,5 +89,5 @@ export function createHomeAssistantAdapter(config: HomeAssistantConfig): HomeAss
|
||||
}
|
||||
}
|
||||
|
||||
return withDiagLogging("homeassistant", { ping, listEntities });
|
||||
return withDiagLogging("homeassistant", { ping, listEntities, read: listEntities });
|
||||
}
|
||||
Reference in new issue
Block a user