# ActionNodeDsl


```
interface ActionNodeDsl : AutomationFlowContributor
```

<br />

Known direct subclasses [ParallelFlowBuilder](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ParallelFlowBuilder), [SequentialFlowBuilder](https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ParallelFlowBuilder` | Type-safe builder that builds a `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ParallelFlow` node. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder` | Type-safe builder that builds a `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow` Node. |

*** ** * ** ***

Interface for constructing `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action` nodes and contributing them to an automation flow.

## Summary

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.automation.AutomationPartPath,kotlin.Function1)(automationPartPath: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationPartPath, block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.automation.TypedExpression,kotlin.Function1)( entityExpression: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression<https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedEntity<HomeObjectType>?>, block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html )` Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `<T : HomeObjectType> https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.automation.TypedExpression,kotlin.Function1)( entityExpression: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedEntity<T>>?>, block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html )` Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.Structure,kotlin.Function1)(structure: https://developers.home.google.com/reference/kotlin/com/google/home/Structure, block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.HomeDevice,com.google.home.DeviceTypeFactory,kotlin.Function1)( device: https://developers.home.google.com/reference/kotlin/com/google/home/HomeDevice, deviceType: https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType>, block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html )` Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalApi https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.HomeEntityType,com.google.home.DeviceTypeFactory,kotlin.Function1)( entity: https://developers.home.google.com/reference/kotlin/com/google/home/HomeEntityType, deviceType: https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType>, block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html )` Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action` on an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.HomeEntityType,com.google.home.DeviceTypeFactory,kotlin.Function1)` targeting a constituent `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.HomeEntityType,com.google.home.DeviceTypeFactory,kotlin.Function1)`. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.automation.UnknownEntity,com.google.home.TypeFactory,kotlin.Function1)( unknownEntity: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEntity, entityType: https://developers.home.google.com/reference/kotlin/com/google/home/TypeFactory<HomeObjectType>, block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html )` Build an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action` using an UnknownEntity. |

### Inherited functions

From [com.google.home.automation.AutomationFlowContributor](https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowContributor) `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowBuilder` `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowContributor#flowBuilder()()`

## Public functions

### action

```
open fun action(automationPartPath: AutomationPartPath, block: ActionBuilder.() -> Unit): Unit
```

Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`.

| Parameters |
|---|---|
| `automationPartPath: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationPartPath` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationPartPath` associated with the `Action`. |
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder` used to build the `Action`. |

### action

```
open fun action(
    entityExpression: TypedExpression<TypedEntity<HomeObjectType>?>,
    block: ActionBuilder.() -> Unit
): Unit
```

Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`.

| Parameters |
|---|---|
| `entityExpression: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression<https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedEntity<HomeObjectType>?>` | The entity `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder` used to build the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |

### action

```
open fun <T : HomeObjectType> action(
    entityExpression: TypedExpression<List<TypedEntity<T>>?>,
    block: ActionBuilder.() -> Unit
): Unit
```

Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`.

| Parameters |
|---|---|
| `entityExpression: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedEntity<T>>?>` | The entity list `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder` used to build the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |

### action

```
open fun action(structure: Structure, block: ActionBuilder.() -> Unit): Unit
```

Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`.

| Parameters |
|---|---|
| `structure: https://developers.home.google.com/reference/kotlin/com/google/home/Structure` | The `https://developers.home.google.com/reference/kotlin/com/google/home/Structure` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder` used to build the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |

### action

```
open fun action(
    device: HomeDevice,
    deviceType: DeviceTypeFactory<DeviceType>,
    block: ActionBuilder.() -> Unit
): Unit
```

Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`.

| Parameters |
|---|---|
| `device: https://developers.home.google.com/reference/kotlin/com/google/home/HomeDevice` | The `https://developers.home.google.com/reference/kotlin/com/google/home/HomeDevice` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `deviceType: https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType>` | The `https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder` used to build the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |

### action

```
@HomeExperimentalApi
open fun action(
    entity: HomeEntityType,
    deviceType: DeviceTypeFactory<DeviceType>,
    block: ActionBuilder.() -> Unit
): Unit
```

Build and add an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action` on an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.HomeEntityType,com.google.home.DeviceTypeFactory,kotlin.Function1)` targeting a constituent `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl#action(com.google.home.HomeEntityType,com.google.home.DeviceTypeFactory,kotlin.Function1)`.

| Parameters |
|---|---|
| `entity: https://developers.home.google.com/reference/kotlin/com/google/home/HomeEntityType` | The `https://developers.home.google.com/reference/kotlin/com/google/home/HomeEntityType` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `deviceType: https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType>` | The `https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder` used to build the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |

### action

```
open fun action(
    unknownEntity: UnknownEntity,
    entityType: TypeFactory<HomeObjectType>,
    block: ActionBuilder.() -> Unit
): Unit
```

Build an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action` using an UnknownEntity. Automations created using this method will not be valid. This method can be used to create draft automations.

| Parameters |
|---|---|
| `unknownEntity: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEntity` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEntity` associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |
| `entityType: https://developers.home.google.com/reference/kotlin/com/google/home/TypeFactory<HomeObjectType>` | The type associated with the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Starter`. |
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder` used to build the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action`. |