Sensor State
A Binary or State sensor has a current value: a switch is on or off, a thermostat is heating or idle. That value can change in two ways, and the platform keeps track of both:
- The device reports it, because something changed on the device itself, such as someone flipping a physical switch. That’s what this guide covers.
- You or an automation send a command, and the device confirms it. See Sending Commands.
1. Which sensors can report state
Section titled “1. Which sensors can report state”| Data direction | Can report state | Can receive commands |
|---|---|---|
| Send | Yes | No |
| Receive | No | Yes |
| Exchange | Yes | Yes |
Use Exchange for something that can change both ways, such as a smart relay with a button on it. Telemetry sensors send readings instead.
2. Reporting from the device
Section titled “2. Reporting from the device”With the Node.js SDK:
device.turnOn('relay') // a Binary sensordevice.turnOff('relay')device.reportState('mode', 'heat') // a State sensorWith the Embedded C SDK:
device.reportState("relay", "1");device.reportState("mode", "heat");After a command, there’s no need to report the new value as well: acknowledging the command confirms it.
3. While the device is offline
Section titled “3. While the device is offline”- Node.js SDK: the call returns
falseand the report is dropped. Report the current state again once the device reconnects. - Embedded C SDK: only the latest value per sensor is kept, and it’s delivered on reconnect. Flip a switch five times while offline, and the console gets the final position.
4. Seeing state in the console
Section titled “4. Seeing state in the console”A sensor’s page shows its current value and how it got there:
- Last reported — on a Send sensor, when the device last reported a value. The page notes that the sensor can’t receive commands.
- Last confirmed — on a Receive or Exchange sensor, when the value was last confirmed.
The page’s history table lists every change: the value, who or what made it (Device, a team member’s name, or an automation’s name), and when. The page updates on its own while you have it open.
5. Using state in automations
Section titled “5. Using state in automations”A state change can start an automation, through a Sensor Event trigger on that sensor, and conditions can compare against a sensor’s current value. See Automations.
Next steps
Section titled “Next steps”- Sending Commands — changing a value from the platform.
- Device Provisioning — sensor types and data direction.

