Home Assistant WebSocket API
ha_wsExecutes a single Home Assistant command with optional event collection, closing the socket after each call.
Instructions
Send one supported Home Assistant command. The bridge owns authentication and request IDs. Optional bounded event collection stays within this call; the socket always closes afterwards. No monitoring or retries.
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": {
"command": "<command>"
},
"name": "ha_ws"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| waitMs | No | ||
| command | Yes | ||
| eventLimit | No |