Action Reference

The 24 blocks that command a device or ask the registry a question. Command blocks take a device pin and report success on ok; query blocks read memory and cost nothing.

An action block has a flow IN pin: it sits in the middle of a chain like any other block.

What every command block shares

Blocks that address one device take a device pin: the platform id, the native address, or the exact device name. When the studio's device picker ships, a device selected there is used when the pin is empty, and the pin always wins. If neither is set the block reports HOMEASSIST_DEVICE_REQUIRED rather than guessing.

Command blocks report the same four out-pins:

Out-pinTypeCarries
flowflowContinues whether the command succeeded or not.
okconditionTrue when the command reached the device.
deviceobjectThe device the command was sent to.
errorvalueEmpty on success, otherwise a code plus the detail.

Branch on ok

A command to an unreachable bulb is an ordinary event in a house, not an exceptional one, so failures are reported on ok and error rather than thrown.

Not on the returned device state

Hue and Daikin confirm synchronously, but radio adapters do not: the Zigbee bulb has been told, and its own report arrives a moment later. The snapshot you get back is the pre-command one.

Error codes

CodeMeans
HOMEASSIST_NOT_AVAILABLEThis node has [homeassist] enabled = false. Reported on the error pin rather than thrown, so a flow that runs on both a Nano and a cloud node can branch on it instead of blowing up.
HOMEASSIST_DEVICE_REQUIREDNo device pin and no picked device.
HOMEASSIST_DEVICE_NOT_FOUNDNothing resolved from that id, native id or name.
HOMEASSIST_DEVICE_NOT_ADOPTEDThe device exists but is not in service. See Discovering and Adopting Devices.
HOMEASSIST_CAPABILITY_UNSUPPORTEDThe device never announced that capability, so nothing was sent to the radio.
HOMEASSIST_ADAPTER_REQUIREDpairing open with no adapter named.
HOMEASSIST_ADAPTER_NOT_FOUNDThat adapter is not configured on this node.
HOMEASSIST_COMMAND_REJECTEDThe device or its daemon refused the command.
HOMEASSIST_PAIRING_UNSUPPORTEDThat adapter has no inclusion mode. Daikin units join by WiFi; UniFi devices are enrolled in the UniFi app.
HOMEASSIST_NOTHING_TO_SETclimate set with none of mode, temperature or fan wired.
HOMEASSIST_HISTORY_NOT_AVAILABLEHome automation is on but analytics is off.

The error string carries the code and the detail, for example HOMEASSIST_DEVICE_NOT_FOUND: zigbee:0x1234.

Lights

BlockPins beyond deviceDoes
light on brightness %, kelvin, colour Turns the light on, applying everything set in one command. Unset pins leave the lamp's current value alone.
light off Turns it off. No side effects beyond the power state: brightness and colour are remembered by the lamp and restored when it is next turned on.
light toggle Reads the current power state from the registry and sends the opposite.
light dim brightness % Sets brightness without changing anything else.
  • One command, not three. Sending power, then brightness, then colour separately makes the bulb visibly jump to full white before settling, so light on carries those pins.
  • Kelvin, not mireds. 2200 candle, 2700 warm white, 4000 neutral, 6500 daylight. The adapters convert.
  • Toggle treats unknown as off, and turns the lamp on. A lamp nobody has heard from since it was adopted has no power state, and a toggle that errors is useless to the person standing in a dark room.
  • light dim implies power. Setting a brightness on a lamp that is off turns it on at that brightness, and setting 0 turns it off. Use light off when off is what you mean; it reads better on the canvas.

light on carries brightness, colour temperature and colour on its own pins, and sends every value that is set in ONE command, so the lamp transitions once instead of visibly stepping through full white first. Brightness is a percentage and colour temperature is in KELVIN, not mireds: 2200 candle, 2700 warm white, 6500 daylight. The device pin takes a platform id, a native address or an exact device name.

Studio canvas example for the light on block: on, warm and dimmed, in one command.

Switches

BlockDoes
switch onSets power true on a device classified as a switch.
switch offSets power false.

Identical on the wire to light on and light off. They are separate blocks because pickers and flows read better when plugs are not offered as lights, and because a metering plug classifies as a switch even when its vendor announces it as a light.

Climate

BlockPinsDoes
climate set mode, target °C, fan Commands a Daikin air conditioner over its local API, or a Zigbee, Z-Wave or Matter thermostat over the radio.
  • Mode is one of off, auto, cool, heat, dry, fan. Setting anything other than off implies switching the unit on.
  • Fan is auto, silent, low, medium, high or turbo. Devices with fewer speeds get the nearest they have.
  • Empty pins keep the current value, and wiring none of the three reports HOMEASSIST_NOTHING_TO_SET rather than claiming a command was sent.
  • Everything goes in one command for the same reason as lights. On Daikin that means a read-modify-write of the whole control block, because its API rejects partial updates and resets any field you omit.

Doors and gates

These four command an access-controlled door through the UniFi adapter.

BlockPins beyond deviceDoes
door unlock stay unlocked Releases the lock. By default this is a momentary unlock: the controller holds the relay open for its configured time and then re-locks.
door lock keep schedule Locks the door and holds it locked, overriding its unlock schedule until something releases it. With keep schedule it locks now and leaves the schedule running, so the door unlocks again at its next scheduled time: "lock up for the night".
gate openOpens a gate or garage door. On a controller where a gate is a momentary relay, this pulses it.
gate closeCloses it.
  • A momentary unlock is the default. "Buzz someone in" is the common case, and a door left unlocked until something remembers to lock it would eventually stay unlocked overnight. Set stay unlocked when you mean until further notice, and pair it with a door lock somewhere.
  • On a single-relay gate that toggles, gate open and gate close are the same pulse, and the controller decides the direction from the gate's current position.
  • door_position is read-only. It is a sensor; writing it returns HOMEASSIST_CAPABILITY_UNSUPPORTED.

The escape hatch: write any capability

BlockPinsDoes
device set capability, value Writes any capability by name.

This is how you reach a blind's position, a plain lock's lock_state, or anything else with no dedicated block. Values are coerced to what the device wants, and the capability name is normalised, so "motion" and "on_off" resolve rather than failing.

A capability the device never announced returns HOMEASSIST_CAPABILITY_UNSUPPORTED without touching the radio. Sending an attribute a device does not implement is how you get a bulb that stops responding until it is power-cycled.

Queries read memory and cost nothing

The query blocks read the in-memory device registry. No radio traffic, no network call, cheap enough to run inside a loop: "turn off every light" is a query feeding a map feeding a command.

BlockFiltersReturns
get all devices type, room, adapter, include unadopted devices, count. Adopted only unless you ask otherwise. Filters combine with AND.
get active sensors sensor type, room Sensors currently reading true: motion present, doors open, leaks found.
get lights that are on room Lights whose power state is known and true.
get device device found, device, state (value per capability), available.
get device state device, capability state known, value, plus boolean and number coercions for branching.
get rooms The distinct non-empty room names across adopted devices, sorted.
get status adapters (name and connected), devices total, devices adopted, healthy.
  • Unknown state is excluded, never assumed. A sensor the node has never heard from is left out of get active sensors, and a lamp whose power state nobody knows is left out of get lights that are on. When state known is false on get device state, value is empty and must not be read as false or zero.
  • Reachability is not restored at boot. The lists are populated immediately after a restart, but get device reports available = false until the device actually reports. Read available if a flow needs "this device is there right now".
  • get device reports found = false rather than erroring when nothing matches.
  • get status is how you notice a bridge that has gone away, which otherwise looks like a quiet house. healthy is true only when every configured adapter is connected, and a node with no adapters at all is not healthy.

get lights that are on reads the in-memory device registry, so it makes no network call and is cheap enough to run in a loop. It returns only lights whose power state is KNOWN and true: a lamp the node has not heard from since it started is left out rather than assumed off. The count pin feeds > and branch, which is the shape of "if anything is still on, do something about it".

Studio canvas example for the get lights that are on block: asking the registry which lights are on.

Fleet management from a flow

BlockPinsDoes
device adopt device, name, room Takes a discovered device into service. Reports newly, true only when this call is what adopted it.
device rename device, name, room Sets the friendly name and/or room. Empty pins leave that field alone, so this can set a room without touching the name.
device forget device Drops the device from RUAL. It stays paired to the radio and reappears, unadopted, on its next report.
pairing open adapter, seconds Puts a radio into inclusion mode. Pass 0 to close pairing.
  • Adopt happens before rename. If the adopt succeeds and the rename does not, ok stays true, newly is accurate, and the error pin carries the rename failure.
  • The seconds pin on pairing open is a request. It is clamped to the node's pairing_window, and the clamp is not an error.
  • Forget does not unpair. Unpairing is not exposed as a block. See Forget Is Not Unpair.

History reads the past

BlockPinsReturns
get device history device, capability, from, to, buckets readings, buckets, count, recording, unit, error.

The only block here that reads the analytics store rather than the live registry. The window defaults to the last 24 hours, and buckets greater than 0 additionally returns aggregated windows. Watch recording: false means this node stores no history for that capability, which is a different answer from "nothing happened".

The sampling policy, the bucket shapes and the energy dashboard are on Device History and Energy.

Next steps

Example Flows These blocks wired into nine complete automations. Device History and Energy What gets stored, buckets versus raw, and the energy panel. Trigger Reference The blocks that start these flows.

Frequently asked

How do I tell whether a RUAL device command actually worked?

Branch on the ok out-pin. A command to an unreachable bulb is an ordinary event in a house, so failures are reported on ok and error rather than thrown. Do not compare the returned device state: radio adapters return the pre-command snapshot because the device's own report arrives a moment later.

How do I set brightness and colour temperature on a RUAL light?

Use the brightness, kelvin and colour pins on the light on block, which sends every value set on it in one command so the lamp transitions once instead of stepping through full white first. Colour temperature is in kelvin, not mireds: 2700 is warm white and 6500 is daylight.

Are the RUAL device query blocks expensive to call?

No. Get all devices, get active sensors, get lights that are on, get device and get rooms read the in-memory registry, so they make no network call and touch no radio, and they are cheap enough to call inside a loop.