Resources · n8n integration

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

Why automate

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.

Connect

How do you connect Home Assistant to n8n?

  1. 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.

  2. 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, not https://your.awesome.home.

  3. 03

    Set the port and the SSL toggle

    For Port, keep the default 8123 if you reach Home Assistant over http:// and changed nothing, enter 443 if you reach it over https://, 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 on https://.

Actions

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.

Resources × operations matrix
ResourceCreateGetGet ManyCallCheck ConfigurationGet Error LogsGet Logbook EntriesGet ScreenshotCreate or Update
Camera Proxy✓
Config✓✓
Event✓✓
Log✓✓
Service✓✓
State✓✓✓
Template✓

Camera Proxy

1 operation
01

Get a screenshot

cameraProxy.getScreenshot

What 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.
Use cases
a doorbell sensor fires, the workflow snaps the porch camera and posts the picture to a chat channel.

Config

2 operations
02

Get the config

config.get

What 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.

Use cases
a first test node right after saving the credential, to confirm the host, the port and the token actually line up before you build anything on top. It also makes a decent health check inside a scheduled workflow, since a broken connection surfaces here as an error rather than deep inside a service call.
03

Check the config

config.check

What 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.

Use cases
after a change to your Home Assistant files, run this before restarting anything. A workflow can check the configuration, and branch on the result to warn the household chat when the validation comes back unhappy, which is a lot friendlier than discovering it when the heating stops responding.

Event

2 operations
04

Create an event

event.create

What 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.
Use cases
a CRM deal moves to won, n8n raises an event, and an existing Home Assistant automation flashes the office lamp without n8n knowing which lamp it is.
05

Get many events

event.getAll

What 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.
Use cases
discovery. Run it once while building to see the event names your instance actually publishes, then use what you find in the Event Type field of the create operation.

Log

2 operations
06

Get a log for an entity

log.getErroLogs

What 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.

Use cases
a nightly workflow reads the error log, and forwards it somewhere you actually look. Integrations that quietly stopped talking to their device tend to show up here long before anyone notices a switch has gone silent, which turns a vague suspicion into something you can read.
07

Get all logs for an entity

log.getLogbookEntries

What 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.
Use cases
a weekly report on one entity, the garage door for instance, exported to a sheet for whoever asks who opened what.

Service

2 operations
08

Call a service

service.call

What 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.
Use cases
one morning workflow that unlocks the office door, sets the thermostat and starts the playlist.
09

Get many services

service.getAll

What 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.
Use cases
reference material. Before wiring a call, run this to read the exact domain and service names your setup exposes, which beats guessing them from a blog post written against someone else's installation.

State

3 operations
10

Create or update a state

state.upsert

What 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.
Use cases
pushing a number from a business tool into the house, so a dashboard card shows today's orders next to the temperature.
11

Get a state

state.get

What 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.
Use cases
before a scheduled message goes out, check whether anyone is home and skip the reminder when the answer is no.
12

Get many states

state.getAll

What 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.
Use cases
a daily snapshot written to a spreadsheet, which gives you a long history of sensor values to chart later.

Template

1 operation
13

Create a template

template.create

What 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.
Use cases
building one sentence out of several sensors, average indoor temperature and outdoor temperature for example, then sending that single line as the message body instead of three separate reads.
Need help

Need help automating Home Assistant with n8n?

A person reads every message.

FAQ

Home Assistant and n8n, the questions that come next

01Is the Home Assistant n8n integration free?
Yes. The Home Assistant node ships with n8n, so there is nothing to install and nothing extra to pay on the n8n side. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on an instance you host yourself with Docker or npm under the Community Edition and its Sustainable Use licence. A workflow built in one place runs in the other without changes. Home Assistant itself is software you already run, and the token you generate to connect the two costs nothing either. What you are paying for, in both cases, is the n8n hosting model you picked, not this particular node.
02What credentials do you need to connect Home Assistant to n8n?
One Long-Lived Access Token, plus the address of your instance. You generate the token from your Home Assistant User profile, in the Long-Lived Access Tokens section, and paste it into the Access Token field in n8n. Next to it, Host takes the URL or IP address without any protocol in front, and Port takes 8123 by default for an instance reached over http, or 443 when you reach it over https, or whatever value you set yourself. If SSL is enabled in the config.yml map key, or if your interface answers over https, turn the SSL toggle on. The credential is saved once and reused in every workflow after that.
03What are the limits of the Home Assistant node in n8n?
The node covers 7 resources and 13 operations, which is a subset of what the Home Assistant REST API exposes. States, services, events, logs, configuration, templates and camera snapshots are handled; anything else is not. When you need an endpoint the node does not implement, the HTTP Request node calls it directly and reuses the same saved connection through predefined authentication, so you are not managing a second token. The other constraint is network reach rather than features: your n8n instance has to be able to contact the Home Assistant host and port you entered, which takes planning when n8n runs outside the network the house sits on.
04Does Home Assistant have a trigger node in n8n?
No. There is no Home Assistant trigger in n8n, so a workflow cannot sit and wait for the house to move. You start it another way. A Schedule Trigger runs the workflow at a fixed interval and reads the current state, which suits recaps, snapshots and health checks. An n8n Webhook gives you a URL that another service calls, and a Home Assistant automation can call that URL when something happens indoors, which puts the reactive logic on the Home Assistant side. The trigger of any other tool works too, and that is the most common pattern: an event elsewhere leads to a service call in the house.
05n8n or Make for Home Assistant?
It depends on where your instance lives. Make is hosted by Make, with no self-hosting option, and bills by the operation. n8n runs on your own server if you want it to, which matters here because Home Assistant usually sits on a local network that a hosted platform cannot reach without you opening it up. Self-hosting n8n next to Home Assistant keeps the traffic and the access token inside the house. The cost model differs too: per-operation billing punishes workflows that poll a state every few minutes, which is exactly the pattern a house generates. Both build visually, so the decision comes down to hosting, data control and how often your workflows run.