Set Device
Category: Action
Controls a HomeKit device — turn a light on/off, set brightness, adjust thermostat temperature, lock a door, or change any writable characteristic.
When to use
- Turn lights on or off
- Set brightness, colour temperature, or hue
- Adjust thermostat target temperature
- Lock or unlock a door
- Control any HomeKit device characteristic
Configuration
- Device — Select the accessory to control
- Characteristic — Choose which property to set (e.g.
power_state,brightness,target_temperature) - Value — The value to set. Supports:
- Fixed values:
1,80,22.5 - Template expressions:
{{ trigger.to_value }},{{ nodes.code1.data.result }}
- Fixed values:
The value input adapts to the characteristic type:
- On/off characteristics show a toggle switch
- Numeric ranges show a slider
- Enum values show a dropdown
Output data
{{ nodes['<id>'].data.success }}—trueif the device was set successfully{{ nodes['<id>'].data.value }}— The value that was sent{{ nodes['<id>'].data.accessoryId }}— The device ID{{ nodes['<id>'].data.characteristicType }}— The characteristic that was set
Examples
Set brightness from an HTTP response:
- HTTP Request → GET weather API
- Code → calculate brightness based on time of day
- Set Device → living room light, brightness =
{{ nodes.code1.data.brightness }}
Mirror one device to another:
- Device Changed → switch A turns on
- Set Device → switch B, power_state =
{{ trigger.to_value }}
Tips
- The value field supports template expressions — use
{{ }}to reference data from upstream nodes - If the device is unreachable, the action will fail — use
onError: continueto proceed anyway - Setting a device takes a moment — HomeKit operations are asynchronous