# IfThen


```
data class IfThen
```

<br />

*** ** * ** ***

A fundamental clause used within conditional automation nodes like `https://developers.home.google.com/reference/kotlin/com/google/home/automation/IfFlow` and `https://developers.home.google.com/reference/kotlin/com/google/home/automation/IfChain`. It contains a boolean `condition` expression and a `then` `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Node` to be executed if the condition evaluates to true.

## Summary

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/IfThen#IfThen(com.google.home.automation.Expression,com.google.home.automation.Node)(condition: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression, then: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Node)` |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/IfThen#condition()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Node` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/IfThen#then()` |

## Public constructors

### IfThen

```
IfThen(condition: Expression, then: Node)
```

## Public properties

### condition

```
val condition: Expression
```

### then

```
val then: Node
```