Home Assistant Events and Device-Control Boundaries
Hermes can use Home Assistant in two complementary ways: direct tools read and control entities, while the gateway adapter listens for selected state changes and turns them into agent events.
Official documentation: https://hermes-agent.nousresearch.com/docs/user-guide/messaging/homeassistant
Separate observation from action
The toolset can list entities, read state, list available services, and call an approved Home Assistant service. The event adapter subscribes through WebSocket and can notify the agent when selected entities change.
By default, no state-change events are forwarded. That fail-quiet behavior is important because a typical Home Assistant system emits continuous sensor updates. Start with a few meaningful domains or entity IDs instead of enabling all events.
Setup checklist
- Create a dedicated long-lived Home Assistant access token.
- Store the token in the active Hermes profile’s secret store.
- Verify the Home Assistant base URL from the gateway host.
- Test read-only entity listing before any control action.
- Configure specific watched domains or entities.
- Ignore noisy uptime, CPU, and rapidly changing sensor entities.
- Set a cooldown for repeated changes from the same entity.
- Define which service calls require human confirmation.
- Use reversible actions for the first control tests.
Built-in safety boundaries
Hermes blocks several Home Assistant service domains associated with arbitrary code or host-level commands, including shell and script execution surfaces. Entity IDs are validated before service calls. These protections reduce risk, but they do not make every allowed action harmless.
A thermostat change, garage-door action, alarm event, or media command can have real-world effects. Pair tool access with clear approval rules, physical safety assumptions, and a rollback action. Avoid autonomous control of life-safety or access-control devices unless the complete system has been designed for that responsibility.
Common pitfalls
- Setting
watch_alland flooding the agent with noisy state changes. - Treating a long-lived token as ordinary configuration rather than a secret.
- Testing writes before confirming entity identity and current state.
- Creating loops where an agent action triggers another watched event repeatedly.
- Relying on friendly names when automations require stable entity IDs.
- Assuming blocked service domains cover every risky physical action.
Verification steps
- Call the Home Assistant API health route with a protected test method.
- List a small read-only entity set through Hermes.
- Read one known entity and compare it with the Home Assistant UI.
- Trigger one watched, harmless state change and confirm a single event arrives.
- Repeat during the cooldown window and verify noise suppression.
- Perform one reversible action, then restore the original state.
- Attempt a blocked service domain and confirm Hermes refuses it.
- Review event and action logs for loops, unexpected entities, or token exposure.
Smart-home automation is strongest when events are sparse, actions are explicit, and every first test has a safe undo path.
