> For the complete documentation index, see [llms.txt](https://docs.widgelix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.widgelix.com/actions-formerly-rule-engine/condition-types/compare-with-constant.md).

# Compare with constant

Compares the selected data field of the selected assets with a fixed value. This is the most common condition type, e.g. *temperature greater than 30* or *battery voltage less than 3.3*.

## Settings

| Field                   | Description                                                                                                                                                                                                               |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Comparison Operator** | Less Than, Less Than Or Equal, Equal, Greater Than Or Equal, Greater Than, Not Equal, In Range, Out Of Range. See [Comparison Equations](https://docs.widgelix.com/actions-formerly-rule-engine/comparison-equations.md). |
| **Value**               | The threshold. For **In Range** and **Out Of Range** enter a minimum and a maximum.                                                                                                                                       |

Optional for this type: [switching threshold range](https://docs.widgelix.com/actions-formerly-rule-engine/creating-an-action.md#switching-threshold-range-hysteresis) and [temporal control](https://docs.widgelix.com/actions-formerly-rule-engine/temporal-control.md).

## Example

| Setting             | Value                 |
| ------------------- | --------------------- |
| Asset Template      | `generic-node`        |
| Data Field          | `temperature`         |
| Assets              | Greenhouse sensor     |
| Comparison Type     | Compare with constant |
| Comparison Operator | Greater Than          |
| Value               | `30`                  |

The statement card then reads **IF** `temperature` generic-node **IS** Greater Than **30**.
