Home Assistant: Control Your Smart Home with Hermes
Connect Hermes Agent to Home Assistant — automate your smart home with natural-language commands.
Imagine your smart home is a busy orchestra—lights, thermostats, sensors, and speakers all playing their own tune. Hermes Agent is the conductor that listens to every note and can tell any musician to play louder or stop. That’s exactly what this integration does: it lets your AI agent watch your home in real time and control it with simple commands.
What You Get
This feature gives you two superpowers:
- A Listening Ear (Gateway) — Hermes Agent connects to Home Assistant like a friend who’s always watching your house. It sees when a light turns on, a door opens, or the temperature drops—instantly.
- A Helping Hand (Smart Home Tools) — Four special tools let you ask questions like “What’s the living room temperature?” or give orders like “Turn off the kitchen lights” using plain English.
Home Assistant support now comes from the official homeassistant plugin in the plugin catalog. It’s maintained by Nous Research and is not part of Hermes core, so you install it separately.
Step 0: Install the Plugin
hermes plugins install homeassistant
Plugins are installed per profile. To use Home Assistant in another profile, install it there too:
hermes -p <profile> plugins install homeassistant
The plugin brings its own Python dependency (aiohttp), so there’s no pip extra to install. The old hermes-agent[homeassistant] extra has been removed.
Upgrading from an older release? Nothing to do. Every profile that was already using Home Assistant (HASS_TOKEN in its .env, platforms.homeassistant enabled or given a token in config.yaml, or the homeassistant toolset listed in platform_toolsets) gets the plugin installed automatically from the catalog by hermes update (for all profiles sharing the install). If that step could not run, Hermes installs it the first time the profile starts (agent or gateway start; this honours security.allow_lazy_installs). After a failed attempt (offline, catalog unreachable) starts retry at most once an hour; hermes update always retries. The outcome is reported in the terminal, the Desktop app and chat. This happens once per profile: if you later remove the plugin (hermes plugins remove homeassistant), it stays removed. Your configuration carries over unchanged—same variables, same platform name, same tool names, same cron deliver: homeassistant:<notify target> syntax. One difference: like every plugin tool, the ha_* tools sit behind Tool Search (tool_search / tool_call) when it’s on, instead of being listed directly.
Step 1: Get Your Secret Key
First, you need a special password called a “Long-Lived Access Token.” Think of it as a VIP pass that lets Hermes Agent talk to your Home Assistant.
- Open your Home Assistant dashboard
- Click your Profile (bottom of the sidebar)
- Scroll down to Long-Lived Access Tokens
- Click Create Token—name it “Hermes Agent”
- Copy the token immediately (you won’t see it again!)
Step 2: Tell Hermes Agent the Secret
Now you need to store that token in your computer’s environment variables. This is like writing the VIP pass number in a secret notebook that only Hermes Agent reads.
Open your terminal and run:
export HASS_TOKEN="your_token_here"
export HASS_URL="http://your-home-assistant-ip:8123"
Pro tip: Put these lines in your .bashrc or .zshrc file so they’re always available. Don’t worry if that sounds technical—just paste them at the bottom of the file.
With the plugin installed, the homeassistant toolset is enabled automatically when HASS_TOKEN is set. Both the gateway platform and the device control tools activate from this single token.
If you want a default notify target for a bare deliver: homeassistant, add this too:
# Optional: default notify target for a bare `deliver: homeassistant`
HASS_HOME_CHANNEL=mobile_app_my_phone
You can also set the URL in config.yaml instead of the environment:
url: http://192.168.1.100:8123 # optional; same as HASS_URL
| Setting | Default | What it does |
|---|---|---|
url |
HASS_URL, else http://homeassistant.local:8123 |
Home Assistant base URL |
Step 3: Test It Out
Once you’ve set the variables, restart Hermes Agent. Then try asking:
"What's the temperature in the bedroom?"
"Turn on the hallway lights"
"Are any doors open right now?"
If everything works, you’ll get instant answers and actions. If not, double-check that your token has no spaces and your URL is correct.
Real-Life Example
Say you’re at work and want to make sure your home is safe. With this integration, you could ask Hermes Agent: “Check if any windows are open” or “Set the thermostat to 20 degrees before I get home.” It’s like having a helpful house-sitter who never sleeps.
Scheduled Jobs and Webhooks
Cron jobs and webhook routes can deliver messages to Home Assistant:
deliver: homeassistant:mobile_app_my_phone # explicit notify target
deliver: homeassistant # uses HASS_HOME_CHANNEL
The bare homeassistant form needs HASS_HOME_CHANNEL set to a default notify target. See Scheduled Tasks and Webhooks.
Good to Know
- Notifications are quiet by default. The platform uses the
minimaldisplay defaults (no tool-progress or streaming chatter). Override them underdisplay.platforms.homeassistantinconfig.yamlif you want more. - No pairing needed. Home Assistant events are always authorized:
HASS_TOKENauthenticates the connection and there is no human sender to allowlist or pair.
Summary & Practical Tip
This integration turns Hermes Agent into your home’s brain—it listens to everything and can control anything. Start small: connect just a few lights or sensors first. Then expand as you get comfortable.
My best tip: Create a routine! Ask Hermes Agent every morning: “What’s the weather and should I close the bedroom window?” It’ll become your favorite smart home habit.
Troubleshooting: If the platform or tools are missing, check the plugin is installed and enabled in the active profile with hermes plugins list. If it’s missing, run hermes plugins install homeassistant (or hermes -p <profile> plugins install homeassistant) and restart the gateway. With security.allow_lazy_installs turned off, the automatic first-start install is skipped and you must install the plugin yourself.
📖 Official Docs
This article is based on the official Hermes Agent documentation:Official docs › user-guide/messaging/homeassistant