# Calibration action step types

> For the complete documentation index, see [llms.txt](https://docs.oriondata.io/llms.txt)

Value, sensor, soft-sensor, previous-step and sliding-window inputs for calibration actions.

Each action step in a calibration group is a two-sided expression: a left side, an operator, and a right side. Any action side type can be placed on either the left or right side of an expression. This article describes each available action side type, its configuration options, and key usage notes.

For a full reference of available operators, see [Operators reference](https://docs.oriondata.io/portal/calibrations/reference/operators-reference/).

## Value

A literal number entered directly into the step.

### Non-constant values

Any number up to 12 decimal places.

### Constant values

Three named constants are available as alternatives to typing a fixed number:

| Constant       | Description                                                                       |
| -------------- | --------------------------------------------------------------------------------- |
| Pi             | The mathematical constant _**π**_ (3.14159…)                                      |
| Euler’s Number | The mathematical constant _**e**_ _(2.71828…)_                                    |
| Julian Date    | The current date expressed as a numerical value, recalculated for each data point |

## Sensor Value

References a raw sensor reading from a physical device.

### Device scope

| Option                | Behaviour                                                      |
| --------------------- | -------------------------------------------------------------- |
| This Device (default) | Select any raw sensor on the same device                       |
| All Devices           | Select a device first, then select a raw sensor on that device |

### Time offset

An optional time offset can be applied to retrieve a sensor reading from an earlier point in time. Enter a number and select a unit: Minutes, Hours, or Days.

If no reading exists at exactly the specified offset, the result is null. There is no nearest-match fallback. Consider the device’s data frequency when choosing an offset value to avoid unintended null results.

![Sensor value action for Rainfall with time offset ticked, set to 1 hour(s) earlier](https://docs.oriondata.io/images/portal/calibrations/reference/action-step-types-reference/sensor-value-action-rainfall-time-offset-ticked-set-1-hour-s-earlier.png)

## Soft Sensor Value

References a reading from a soft sensor. Soft sensors are virtual sensors on a device record that have no corresponding physical sensor. They can reference other soft sensors.

Configuration options are identical to Sensor Value:

- **This Device** or **All Devices** scope
- Optional time offset with the same null behaviour as described above

### Self-referencing soft sensors

A soft sensor calibration can reference itself using a Soft Sensor Value action. This is the mechanism used for accumulating patterns such as running totals. However, self-referencing is only supported from Group 2 onwards. A self-referencing action in Group 1 will not produce a valid result because the soft sensor’s value is only saved after a group completes.

## Previous Step Value

References the output value of an earlier numbered step within the same group. Steps are numbered from 1, resetting at the start of each group.

Previous Step Value can appear on either side of an expression. It cannot reference a condition; only action steps produce output values that can be referenced this way. Any earlier step can be referenced regardless of position, for example Step 1 can be referenced from Step 3 even when Step 2 exists.

### Typical usage pattern

Step 1 computes an initial value using a sensor reading and a literal value. Steps 2 and onwards reference **Previous Step 1** on either side to build on that result. The output of the final step in the group becomes the group’s output value.

## Aggregate (Sliding Window)

A rolling calculation over a time window ending at the current data point’s timestamp, inclusive. The aggregate recalculates for every incoming data point, producing one output value per incoming data point.

Because the current data point is always included in the window, there is always at least one data point present in the calculation.

### Configuration

| Field     | Options                                                                                          |
| --------- | ------------------------------------------------------------------------------------------------ |
| Source    | Sensor or Soft Sensor, with the same This Device / All Devices scope as above                    |
| Operation | Min, Max, Sum, Average, Pick                                                                     |
| Period    | 5min, 10min, 15min, 30min, 1h, 2h, 3h, 6h, 8h, 12h, 1d, 2d, 3d, 1w, 2w, 1month, 2months, 3months |

### Pick operation

Pick selects the first data point at the start of the window. The same result can be achieved more simply by applying a time offset to a Sensor Value or Soft Sensor Value action.

### Self-referencing restriction

A sliding window aggregate can reference the same sensor or soft sensor being calibrated, but only from Group 2 onwards. A self-referencing sliding window aggregate in Group 1 will not work because the sensor’s value is only saved after a group completes. Referencing a different sensor has no group restriction.

### When to use a sliding window aggregate

Use a sliding window aggregate when you need an aggregated value recalculated at every incoming data point, for example a 6-hour rolling average updated on each new reading. If you only need one summarised data point per period, use the global aggregate instead. For a comparison of the two aggregate types, see Aggregates reference.

![Aggregate action summing the Rainfall sensor, calculated over 1 hour](https://docs.oriondata.io/images/portal/calibrations/reference/action-step-types-reference/aggregate-action-summing-rainfall-sensor-calculated-over-1-hour.png)

## Summary

Action step types define what values are used on each side of a calibration expression. The five types are Value, Sensor Value, Soft Sensor Value, Previous Step Value, and Aggregate (Sliding Window). Each type has specific configuration options and usage constraints, particularly around self-referencing soft sensors and sliding window aggregates, which are only supported from Group 2 onwards. Time offsets on Sensor Value and Soft Sensor Value actions return null if no reading exists at the exact offset.

## Next Steps

- Review all available operators: see [Operators reference](https://docs.oriondata.io/portal/calibrations/reference/operators-reference/)
- Understand how sliding window aggregates differ from the global aggregate: see Aggregates reference
- Learn how to chain steps and carry values between groups: see Working with calibration groups

## Related articles

- [Calibration operators](https://docs.oriondata.io/portal/calibrations/reference/operators-reference/)
- [Calibration aggregates](https://docs.oriondata.io/portal/calibrations/reference/aggregates-reference/)
- [Calibration conditions](https://docs.oriondata.io/portal/calibrations/reference/calibration-conditions-reference/)
- Working with calibration groups
- Common calibration patterns
