Reference · Tools

Home Assistant

Interact with a Home Assistant instance to manage smart home devices, states, services, events, configuration, logs, templates, and camera screenshots.

Action (binary) Utility v1 Binary data

The Home Assistant node reaches into a Home Assistant instance to read entity states, call services, fire events, inspect configuration and logs, render templates and capture camera screenshots. A typical build is snapshotting the front-door camera when a motion sensor changes state and sending the image to your phone.

Node type
Action (binary)
Parameters
32
Outputs
Output, Error
Credentials
Home Assistant API

Home Assistant

Manage Home Assistant smart home devices, states, services, events, camera screenshots, and more.

Overview

The Home Assistant tool connects to a Home Assistant instance via its REST API. It supports 8 resources: Camera Proxy (get a screenshot as binary), Config (get/check), Event (create/get many), History (get state changes), Log (error logs and logbook entries), Service (call/get many), State (get/get many/upsert), and Template (render Jinja2). The Camera Proxy operation produces binary image data. Authentication uses a Long-Lived Access Token.

Category: Utility
Tool Name: home_assistant
Version: 1

Appearance: Icon: si-homeassistant | Color: #41BDF5

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Home Assistant API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Camera ProxycameraProxy
Configconfig
Eventevent
Historyhistory
Loglog
Serviceservice
Statestate
Templatetemplate

Operations

OperationValueDescription
Get ScreenshotgetScreenshotCamera Proxy — get the camera screenshot
GetgetConfig — get the configuration
Check ConfigurationcheckConfig — check the configuration for errors
Get ManygetAllEvent — get many events
CreatecreateEvent — fire a custom event
Get ManygetAllHistory — get many state changes
Get Error LogsgetErroLogsLog — get the error log
Get Logbook EntriesgetLogbookEntriesLog — get logbook entries
Get ManygetAllService — get many services
CallcallService — call a service within a specific domain
GetgetState — get the state of a specific entity
Get ManygetAllState — get many states
Create or UpdateupsertState — create a new state or update an existing one
RendercreateTemplate — render a Jinja2 template

Operation values are scoped to their resource, so the same value can mean different things: get reads the configuration under Config and one entity’s state under State, and create fires an event under Event but renders a template under Template.

Parameters

ConfigGet, ConfigCheck Configuration and LogGet Error Logs take no parameters of their own — see All Operations.

Camera Proxy: Get Screenshot

ParameterTypeRequiredDefaultDescription
Camera Entity IDstringYesCamera entity ID (e.g., “camera.front_door”). Get from GET /api/states filtered to entities starting with “camera.”. Supports expressions like {{ $json.camera }}.
Binary PropertystringYesdataName of the output binary field to store the screenshot image in. Names are case-sensitive.

Event: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)

Event: Create

ParameterTypeRequiredDefaultDescription
Event TypestringYesThe event type name to fire (e.g., “my_custom_event”). Supports expressions.
Event AttributesfixedCollectionNo{}Key-value pairs to include as the event data payload. Add one entry per attribute.
— NamestringNoAttribute name.
— ValuestringNoAttribute value.

History: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)
Additional FieldscollectionNo{}Optional filters narrowing the history query.
— Start TimedateTimeNoThe beginning of the period (appended to URL path).
— End TimedateTimeNoThe end of the period.
— Entity IDsstringNoComma-separated entity IDs to filter.
— Minimal ResponsebooleanNofalseWhether to only return last_changed and state for states.
— Significant Changes OnlybooleanNofalseWhether to only return significant state changes.

Log: Get Logbook Entries

ParameterTypeRequiredDefaultDescription
Additional FieldscollectionNo{}Optional filters narrowing the logbook query.
— Start TimedateTimeNoThe beginning of the period.
— End TimedateTimeNoThe end of the period.
— Entity IDstringNoEntity ID to filter logbook entries.

Service: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)

Service: Call

ParameterTypeRequiredDefaultDescription
DomainstringYesService domain (e.g., “light”, “switch”, “automation”). Get domains from GET /api/services. Supports expressions.
ServicestringYesService name (e.g., “turn_on”, “turn_off”, “toggle”). Get services from GET /api/services filtered by domain. Supports expressions.
Service AttributesfixedCollectionNo{}Key-value pairs to pass to the service (e.g., entity_id, brightness). Add one entry per attribute.
— NamestringNoName of the field.
— ValuestringNoValue of the field.

State: Get

ParameterTypeRequiredDefaultDescription
Entity IDstringYesEntity ID (e.g., “sensor.temperature”, “light.kitchen”). Get from GET /api/states. Supports expressions.

State: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)

State: Create or Update

ParameterTypeRequiredDefaultDescription
Entity IDstringYesThe entity ID for which a state will be created or updated. Get from GET /api/states. Supports expressions.
StatestringYesThe state value to set (e.g., “on”, “off”, “21.5”). Supports expressions.
State AttributesfixedCollectionNo{}Key-value attribute pairs for the state. Add one entry per attribute.
— NamestringNoAttribute name.
— ValuestringNoAttribute value.

Template: Render

ParameterTypeRequiredDefaultDescription
TemplatestringYesJinja2 template string to render (e.g., {{ states("sensor.temperature") }}). Supports expressions.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Results are merged into the item JSON at the top level, so the incoming fields stay addressable alongside them, and binary data from upstream is forwarded. Several operations return a list — those fan out to one output item per result rather than nesting an array on a single item, so no Split Out node is needed.

Resource: OperationItems outWhat lands on the item
Camera Proxy: Get Screenshot1The item JSON is unchanged. The screenshot is written to the binary property you named, as screenshot.jpg with the content type Home Assistant returned, and merged alongside any binary the item already carried.
Config: Get1The full Home Assistant configuration — version, location, unit system, time zone, components and paths.
Config: Check Configuration1The configuration check result — whether the configuration is valid and any errors found.
Event: Get Manyone per eventEach event listener object Home Assistant knows about, capped by Limit unless Return All is on.
Event: Create1Home Assistant’s acknowledgement of the fired event. A plain-text acknowledgement is placed on message.
History: Get Manyone per entity groupHome Assistant returns history grouped by entity, and each group is placed on history as an array of state records. When nothing matches, a single item is emitted with history: [].
Log: Get Error Logs1errorLog — the raw error log as one string.
Log: Get Logbook Entriesone per entryEach logbook entry merged onto its own item. When nothing matches, the input item passes through unchanged.
Service: Get Manyone per domainEach service domain with the services it exposes, capped by Limit unless Return All is on.
Service: Callone per affected entityHome Assistant returns the states it changed, and each becomes its own item. A service that changes nothing returns an empty list, and the input item passes through unchanged.
State: Get1The entity’s state object — its entity_id, current state, attributes and change timestamps.
State: Get Manyone per entityThe same state object for every entity, capped by Limit unless Return All is on.
State: Create or Update1The state object as Home Assistant stored it after the write.
Template: Render1renderedTemplate — the rendered template output as a string.

Reference the result downstream by expression, for example {{ $json.state }} after a State: Get, or {{ $json.renderedTemplate }} after a Template: Render.

Usage Examples

  • Get the current state of a temperature sensor
  • Turn on a light using service call
  • Capture a camera screenshot
  • Fire a custom event
  • Get the Home Assistant configuration
  • Render a Jinja2 template
  • Get error logs from Home Assistant

Example Configuration

Read one entity’s current state:

{
  "type": "home_assistant",
  "parameters": {
    "resource": "state",
    "operation": "get",
    "entityId": "sensor.living_room_temperature"
  }
}

Turn a light on at half brightness:

{
  "type": "home_assistant",
  "parameters": {
    "resource": "service",
    "operation": "call",
    "domain": "light",
    "service": "turn_on",
    "serviceAttributes": {
      "attributes": [
        { "name": "entity_id", "value": "light.kitchen" },
        { "name": "brightness", "value": "128" }
      ]
    }
  }
}

Capture a camera screenshot into the item’s binary data:

{
  "type": "home_assistant",
  "parameters": {
    "resource": "cameraProxy",
    "operation": "getScreenshot",
    "cameraEntityId": "{{ $json.camera }}",
    "binaryPropertyName": "data"
  }
}

Fire a custom event carrying a payload:

{
  "type": "home_assistant",
  "parameters": {
    "resource": "event",
    "operation": "create",
    "eventType": "workflow_alert",
    "eventAttributes": {
      "attributes": [
        { "name": "source", "value": "busybot" },
        { "name": "severity", "value": "{{ $json.severity }}" }
      ]
    }
  }
}

List every entity’s state, not just the first fifty:

{
  "type": "home_assistant",
  "parameters": {
    "resource": "state",
    "operation": "getAll",
    "returnAll": true
  }
}

Pull a day of history for two sensors, keeping the response small:

{
  "type": "home_assistant",
  "parameters": {
    "resource": "history",
    "operation": "getAll",
    "returnAll": true,
    "additionalFields": {
      "startTime": "2026-03-14T00:00:00Z",
      "endTime": "2026-03-15T00:00:00Z",
      "entityIds": "sensor.living_room_temperature,sensor.hallway_humidity",
      "minimalResponse": true
    }
  }
}

Render a Jinja2 template against live state:

{
  "type": "home_assistant",
  "parameters": {
    "resource": "template",
    "operation": "create",
    "template": "It is {{ states('sensor.living_room_temperature') }} degrees."
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Control Home Assistant smart home devices, read states, call services, fire events, and capture camera screenshots via the HA REST API.

  • Entity IDs follow domain.entity_namelight.kitchen, sensor.temperature, camera.front_door. Read the exact IDs from a State: Get Many run.
  • Attribute collections take one entry per key. Event Attributes, Service Attributes and State Attributes are all name/value lists; add a row for each key you want to send rather than pasting a JSON object.
  • Additional Fields is a flat collection. Its fields nest under additionalFields and are not wrapped in an array.
  • Return All bypasses Limit. With Return All off, results are cut to Limit (default 50, maximum 100) after the request, so a large instance still transfers everything before trimming.
  • Camera screenshots come out as binary, not JSON. The image lands on the binary property you name and existing binary on the item is preserved, so a screenshot can sit next to an earlier attachment.
  • Create or Update writes a state, it does not control a device. Setting a state through the API records a value; use Service: Call to actually switch something on or off.
  • Templates render server-side. The Jinja2 string is evaluated by Home Assistant with access to live state, and the result comes back as text on renderedTemplate.
  • Home Assistant is self-hosted, so the instance URL on the credential must be reachable from the workflow platform, and no external rate limit applies.

Frequently asked questions

What format do entity IDs take?

`domain.entity_name` — for example `light.kitchen`, `sensor.temperature` or `camera.front_door`. Run State: Get Many once to read the exact IDs your instance uses rather than guessing from the UI labels.

How do I pass attributes to a service or event?

Event Attributes, Service Attributes and State Attributes are all name/value lists — add one row per key. Pasting a JSON object into a single row does not work.

Where do the optional fields live?

Additional Fields is a flat collection: its fields nest directly under `additionalFields` rather than being grouped further, which matters when you configure the node as JSON.

Can it capture images from cameras?

Yes — camera screenshots come back as binary data on the output, ready to attach to a message or write to storage.

Build with the Home Assistant node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Home Assistant API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.