I made a plugin that sends AI coding agent status to Home Assistant via webhook
I use [OpenCode](https://opencode.ai), a terminal-based AI coding assistant, and I wanted my Home Assistant setup to know when the agent is busy, waiting for my input, or has hit an error — so I built a plugin for it.
**What it does:** Sends a webhook to HA every time the agent state changes (`busy`, `idle`, `waiting`, `error`), along with the machine hostname, project name, and session ID.
**Payload example:**
```json
{
"state": "waiting",
"hostname": "my-macbook",
"project": "my-app",
"sessionId": "01JFF..."
}
```
**Setup is two files:**
`~/.config/opencode/opencode.json`:
```json
{
"plugin": ["opencode-homeassistant"]
}
```
`~/.config/opencode/opencode-homeassistant.json`:
```json
{
"webhookUrl": "https://your-ha-instance/api/webhook/your\_webhook\_id"
}
```
Then just create a webhook automation on the HA side. No custom integration or HACS needed.
**What I use it for:**
- Desk LED changes color based on agent state (green = working, yellow = needs input, red = error)
- Phone notification when the agent is waiting for my input so I don't leave it hanging
The README has ready-to-use YAML for both of those automations.
**Links:**
- GitHub: https://github.com/pedropombeiro/opencode-homeassistant
Posted Mar 6, 2026, 9:55 PM UTC