Home Assistant Generic WS
AI-generatedSummary
Send a generic command to Home Assistant over its WebSocket API. Set the command type, optionally include parameters, and choose whether to wait for a response; the operation runs once for each incoming item.
Inputs
- Type (required) — Home Assistant WebSocket command type to send. Must be non-empty.
- Has Response — Defaults to true. When enabled, wait for Home Assistant's response and return its result. When disabled, send the command without waiting.
- Has Parameters — Defaults to false. Enable to add command parameters in the request body.
- Specify Body — When parameters are enabled, choose explicit fields or JSON. Defaults to Using Fields Below.
- Body Parameters — With Using Fields Below selected, add name and value pairs for the request body. Repeated names overwrite earlier values.
- JSON — With Using JSON selected, provide the request body as valid JSON.
Output shape
A list of n8n items associated with their corresponding input items.
When waiting for a response, the returned items contain Home Assistant's result. When not waiting, the operation returns empty JSON items. Invalid or missing body parameters and unsuccessful WebSocket requests can cause an error.