← Home

Guide

Connect Home Assistant to Your AI Agent

This one is different from the chat channels. Home Assistant does not become a place you talk to the agent — it becomes something the agent can operate. Ask in Telegram, and the lights go off at home.

What You Get

Once connected, the agent can list the entities in your Home Assistant, read their current state, see which services are available, and call them. In practice that means turning lights and switches on and off, adjusting climate, opening and closing covers, controlling media players and fans, and running scenes and scripts.

You keep talking to the agent wherever you already do — Telegram, Signal, WhatsApp, the dashboard. Home Assistant is the thing it reaches out to.

The One Real Obstacle

Most Home Assistant installs live on a home network at an address like homeassistant.local or a private IP. A hosted agent is not on your home network, so it cannot reach that address. You have three sensible options:

  • Home Assistant Cloud, which gives you a stable external address without opening anything yourself.
  • A private network such as Tailscale joining your Home Assistant and your agent, so the agent reaches it over that network rather than the public internet.
  • A reverse proxy with a proper certificate on a domain you control.

Please do not simply forward the port to the open internet. A long-lived token plus an exposed Home Assistant is full control of your home for anyone who finds it.

Create a Long-Lived Access Token

In Home Assistant, open your user profile, scroll to the bottom, and create a long-lived access token. Copy it immediately — it is shown once. Give it a name that tells you later what it was for, such as the agent's name.

Configure Hermes

Add these on your instance:

HASS_TOKEN=your-long-lived-access-token
HASS_URL=https://your-home-assistant-address

The URL defaults to http://homeassistant.local:8123, which will only work if the agent is genuinely on the same network. Set it to whichever address you chose above.

Restart the gateway so the settings load.

Try It

Ask the agent what entities it can see. That single question tells you whether the token and the URL are both right — a list means you are connected, an error means one of the two is wrong. From there, ask it to turn something on by name.

It helps to name things clearly in Home Assistant. An agent does much better withlight.kitchen_ceiling than with light.switch_3.

Keep It Safe

  • The token is full API access to your home. Treat it like a house key, and revoke it from your profile page if you ever suspect it leaked.
  • Consider a dedicated Home Assistant user for the agent, so you can revoke it independently and see its actions separately in the logbook.
  • Be thoughtful about locks and garage doors. If an agent can open them, so can anyone who can talk to the agent — check who can message your bot.

Troubleshooting

  • Every request times out. The agent cannot reach the URL. This is almost always the home-network problem described above.
  • Unauthorised errors. The token is wrong, was revoked, or belongs to a deleted user. Generate a fresh one.
  • It sees entities but cannot change them. Check the user that owns the token has permission for those entities.
  • It controls the wrong device. Rename your entities to something unambiguous.

Need a Hand?

Contact support from your dashboard. We can wire the agent side up for you — you will need to create the token yourself, and never paste it into a chat message.