# Expression

# Expression


```
sealed interface Expression
```

<br />

Known direct subclasses [Constant](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Constant), [ExpressionWithId](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ExpressionWithId), [Reference](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Reference)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Constant` | Represents a constant. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ExpressionWithId` | Represents an expression with random UUID. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Reference` | Represents a reference to a previously defined node in the automation graph, or an list element for list comprehension expression . |

Known indirect subclasses [And](https://developers.home.google.com/reference/kotlin/com/google/home/automation/And), [BetweenTimes](https://developers.home.google.com/reference/kotlin/com/google/home/automation/BetweenTimes), [Between](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Between), [BinaryExpression](https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression), [Comprehension](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension), [Divide](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Divide), [Equals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Equals), [FieldSelect](https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldSelect), [GetDevicesOfType](https://developers.home.google.com/reference/kotlin/com/google/home/automation/GetDevicesOfType), [GreaterThanOrEquals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThanOrEquals), [GreaterThan](https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThan), [LessThanOrEquals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThanOrEquals), [LessThan](https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThan), [ListAllMatch](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAllMatch), [ListAnyMatch](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAnyMatch), [ListContains](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListContains), [ListFilter](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListFilter), [ListGet](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListGet), [ListIn](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListIn), [ListMap](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListMap), [ListNoneMatch](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListNoneMatch), [ListOf](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListOf), [ListSize](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListSize), [MapFilter](https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapFilter), [MapKeys](https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapKeys), [MapSize](https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapSize), [MapValues](https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapValues), [Minus](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Minus), [Multiply](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Multiply), [NotEquals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/NotEquals), [Not](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Not), [Or](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Or), [Plus](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Plus), [TernaryExpression](https://developers.home.google.com/reference/kotlin/com/google/home/automation/TernaryExpression), [UnaryExpression](https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnaryExpression), [UnknownExpression](https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownExpression)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/And` | The logical AND operator. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BetweenTimes` | The between times operator, which evaluates to `true` when `operand1` is between `operand2` and `operand3`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Between` | The between operator, which evaluates to `true` when `operand1` is between `operand2` and `operand3`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression` | Represents a binary expression with two operands: "`operand1` `operator` `operand2`". |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension` | Represents list comprehension expressions. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Divide` | The DIVIDE operator, which calculates `operand1 / operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Equals` | The equality operator, which evaluates to `true` when `operand1` equals `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldSelect` | Select field(s) from a struct. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/GetDevicesOfType` |   |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThanOrEquals` | The greater-than-or-equal-to operator, which evaluates to `true` when `operand1` `>=` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThan` | The greater-than operator, which evaluates to `true` when `operand1` `>` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThanOrEquals` | The less-than-or-equal-to operator, which evaluates to `true` when `operand1` `<=` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThan` | The less-than operator, which evaluates to `true` when `operand1` `<` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAllMatch` | Represents the "all match" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAnyMatch` | Represents the "any match" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListContains` | Represents the "contains" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListFilter` | Represents the "filter" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListGet` | Represents the "get" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListIn` | Represents the "in" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListMap` | Represents the map operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListNoneMatch` | Represents the "none match" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListOf` | The LIST_OF operator, which creates a list from its elements. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListSize` | Represents the "size" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapFilter` | Represents the "filter" operation on a map expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapKeys` | Represents the "keys" operation on a map expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapSize` | Represents the "size" operation on a map expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapValues` | Represents the "values" operation on a map expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Minus` | The MINUS operator, which calculates `operand1 - operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Multiply` | The MULTIPLY operator, which calculates `operand1 * operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NotEquals` | The not-equals operator, which evaluates to `true` when `operand1` is not equal to `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Not` | The logical NOT operator. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Or` | The logical OR operator. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Plus` | The PLUS operator, which calculates `operand1 + operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TernaryExpression` | Represents a ternary expression with three operands". |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnaryExpression` | Represents a unary expression with one operand: "`operator` `operand`". |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownExpression` | Represents an unknown expression. |

*** ** * ** ***

An expression which evaluates to a value. Depending on the operator, this can be a literal expression such as a constant or a reference, a logical expression, a comparison expression or an arithemetic expression.