Search States

home_assistant.search_states
ActionBusiness appsconnection required

Calls the Home Assistant API with the connection's credentials.

Find entities by domain, name fragment or exact state, from one snapshot of the state machine.

Connection

Required
Yes — the node will not save without one
Auth type
Bearer token
Providers
Home Assistant
Secret shape
the long-lived access token, or {"access_token": "…"}
Config it needs
base_url
Resolved by
config.connection_id, else node.connection_id

Configuration

4 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
domain
Keep only entities in this domain, for example 'light' or 'sensor'.
stringNo——light
query
Case-insensitive fragment matched against the entity id and its friendly name.
stringNo——kitchen
state
Keep only entities whose state is exactly this, for example 'on'.
stringNo——on
limit
How many matching entities to return at most.
numberNo1001–10000—
  • At least one of domain, query, state must be set.

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "domain": "light",
  "limit": 100,
  "query": "kitchen",
  "state": "on"
}

Output

One shape.

result

FieldTypeExample
items
The objects Home Assistant returned, in its own order.
array—
count
How many objects are in `items`.
number—
total
How many entities matched before the limit.
number—
scanned
How many entities the snapshot held in all.
number—
truncated
True when the limit cut matches off the list.
boolean—
{
  "count": 0,
  "items": [],
  "scanned": 0,
  "total": 0,
  "truncated": false
}

Notes

  • Home Assistant has no server-side state search, so this reads the whole state machine once and filters it here.

See Search States run in a workflow.

In a technical demo we add the Home Assistant connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.