- Home
- Resources
- Integrations
- Home Assistant
Home Assistant n8n integrationAutomate Home Assistant with n8n.
Every light, sensor and script in the house becomes a step in a workflow. The Home Assistant n8n integration opens 13 operations across 7 resources: states, services, events, logs, templates, configuration and camera snapshots. No trigger node ships with it, so the run starts from a schedule or a webhook.
Verified Trustpilot reviews · AI, automation & growth agency
What does the Home Assistant n8n integration give you?
Home Assistant runs the house. n8n runs everything around it. The node talks to the Home Assistant REST API with a Long-Lived Access Token, so a workflow can read the state of any entity, call a service, write a state back, render a template or pull a camera image as a file. That is 13 operations spread over 7 resources, all behind a single credential, which is the saved connection n8n reuses in every workflow.
Three shapes cover most of what people build with it. The first is the house reacting to something that happens outside the house: a new row, a new message, a weather change. A workflow watching OpenWeatherMap can call service.call on the cover domain and close the blinds when the forecast turns hot, without a single automation written in YAML.
The second is the house reporting on itself. state.getAll returns the full state machine in one execution, which is enough to build a daily snapshot of every sensor into Google Sheets and keep a history Home Assistant does not keep for you. Pair it with log.getLogbookEntries over a start and end time and you get an audit trail of what moved during the night.
The third is the house talking to people. cameraProxy.getScreenshot puts an image in a binary field, ready to post to Slack when a door sensor flips. And because the node calls services by domain, anything already exposed to Home Assistant is reachable, including bulbs you would otherwise drive through the dedicated Philipshue node.
Where the node stops, HTTP Request takes over. Home Assistant exposes far more endpoints than the seven resources here, history and calendars among them. The HTTP Request node calls any of them and reuses the same saved connection through predefined authentication, so nothing is duplicated. Two limits are worth knowing before you build: there is no Home Assistant trigger node, so a Schedule Trigger or an n8n Webhook, meaning a URL another service calls, has to start the workflow; and your n8n instance has to reach the Home Assistant host over the network, which matters when n8n Cloud sits outside your home network.
If you are still choosing a platform for this kind of local, self-hosted setup, the n8n review goes through the trade-offs in detail.
How do you connect Home Assistant to n8n?
- 01
Generate a Long-Lived Access Token
Log in to Home Assistant and open your User profile. In the Long-Lived Access Tokens section, generate a new token and copy it straight away. This token is the only secret the node needs, and it is what n8n sends on every call to your instance. Keep it somewhere safe while you finish the other fields.
- 02
Fill the credential in n8n
In n8n, create a Home Assistant credential, which is the saved connection you build once and pick from a dropdown in every workflow afterwards. Paste the token into Access Token, then enter the URL or IP address of your instance in Host, without the protocol in front:
your.awesome.home, nothttps://your.awesome.home. - 03
Set the port and the SSL toggle
For Port, keep the default
8123if you reach Home Assistant overhttp://and changed nothing, enter443if you reach it overhttps://, or enter your own value if you configured a specific port. Turn the SSL toggle on when you enabled SSL in the config.yml map key, or when your interface answers onhttps://.
What can the Home Assistant node do?
The Home Assistant node exposes 13 operations across 7 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.
| Resource | Create | Get | Get Many | Call | Check Configuration | Get Error Logs | Get Logbook Entries | Get Screenshot | Create or Update |
|---|---|---|---|---|---|---|---|---|---|
| Camera Proxy | ✓ | ||||||||
| Config | ✓ | ✓ | |||||||
| Event | ✓ | ✓ | |||||||
| Log | ✓ | ✓ | |||||||
| Service | ✓ | ✓ | |||||||
| State | ✓ | ✓ | ✓ | ||||||
| Template | ✓ |
Operations index
Camera Proxy
1 operationGet a screenshot
cameraProxy.getScreenshotWhat you see in n8n
Notes & use cases
Grabs the current image from a camera entity and hands it to the workflow as a file, not as text. Downstream nodes can attach it to a message or drop it in storage.
Key parameters
- Camera Entity Name or ID: the camera to photograph, picked from the list n8n loads from your instance, or set with an expression such as
{{ $json.entity_id }}when an earlier node decides which one. - Put Output File in Field: the name of the output binary field the image lands in, which is what you reference when sending it on.
Config
2 operationsGet the config
config.getWhat you see in n8n
Notes & use cases
Returns the configuration of the Home Assistant instance as the API reports it. Nothing to fill in: the operation takes no parameter, it just answers.
Check the config
config.checkWhat you see in n8n
Notes & use cases
Asks Home Assistant to validate its own configuration and returns the verdict. No parameter either, which makes it cheap to run often.
Event
2 operationsCreate an event
event.createWhat you see in n8n
Notes & use cases
Fires a custom event on the Home Assistant event bus, so automations inside Home Assistant can listen for something that happened in n8n.
Key parameters
- Event Type: the entity ID for which the event will be created, typed as text or built from an expression.
- Event Attributes: optional payload added one pair at a time with Add Attribute, for the data the listening automation needs.
Get many events
event.getAllWhat you see in n8n
Notes & use cases
Lists the events the instance knows about, in one call, with no filter to configure.
Key parameters
- Return All: on, n8n walks the pages of the API until every event is back; off, it stops at Limit.
- Limit: the maximum number of events returned when Return All stays off.
Log
2 operationsGet a log for an entity
log.getErroLogsWhat you see in n8n
Notes & use cases
Pulls the error log of the instance as Home Assistant records it. There is no field to fill, the operation returns what is there.
Get all logs for an entity
log.getLogbookEntriesWhat you see in n8n
Notes & use cases
Returns logbook entries, the human readable history of what changed and when. Left alone it answers for the recent period; the optional fields narrow it down.
Key parameters
- Start Time: the beginning of the period, as a date and time value.
- End Time: the end of that period.
- Entity ID: restricts the logbook to a single entity instead of the whole house.
Service
2 operationsCall a service
service.callWhat you see in n8n
Notes & use cases
This is how a workflow acts on the house. The node picks a service domain, then a service inside it, and Home Assistant does the rest: turning a light on, setting a temperature, running a script.
Key parameters
- Domain Name or ID: the service family, chosen from the list or given by an expression such as
{{ $json.domain }}. - Service Name or ID: the service inside that domain, same list or same expression logic.
- Service Attributes: the values the service expects, added one pair at a time with Add Attribute.
Get many services
service.getAllWhat you see in n8n
Notes & use cases
Returns the services available on the instance, grouped by the domain they belong to.
Key parameters
- Return All: on, every service comes back across as many API pages as needed; off, the result stops at Limit.
- Limit: the maximum number of services returned.
State
3 operationsCreate or update a state
state.upsertWhat you see in n8n
Notes & use cases
Writes a value into the state machine. If the entity already has a state, it is replaced; if not, the entity appears with the value you sent.
Key parameters
- Entity Name or ID: the entity the state belongs to, from the list or from an expression.
- State: the value itself, as text.
- State Attributes: extra pairs attached to the state, added with Add Attribute.
Get a state
state.getWhat you see in n8n
Notes & use cases
Reads the current state of one entity, with its attributes. Nothing is modified, which makes it safe to place in front of any decision in a workflow.
Key parameters
- Entity Name or ID: the entity to read, picked from the list n8n loads from your instance, or supplied by an expression when an earlier node chose it.
Get many states
state.getAllWhat you see in n8n
Notes & use cases
Returns the state of every entity at once, which is the fastest way to see the whole house in a single execution.
Key parameters
- Return All: on, n8n pages through the API until the full state machine is back; off, the run stops at Limit.
- Limit: the maximum number of states returned.
Template
1 operationCreate a template
template.createWhat you see in n8n
Notes & use cases
Renders a Home Assistant template and returns the result, so the logic stays in Home Assistant syntax instead of being rebuilt in n8n nodes.
Key parameters
- Template: the template to render, written as text; the Home Assistant template documentation covers the syntax.
Need help automating Home Assistant with n8n?
A person reads every message.



