# Room

# Room


```
interface Room : HasId, HasHomeDevices, HasCandidates, HasCustomAppData
```

<br />

*** ** * ** ***

An object that represents a Room in a `https://developers.home.google.com/reference/kotlin/com/google/home/Structure`. Implements `https://developers.home.google.com/reference/kotlin/com/google/home/HasHomeDevices` that returns all devices within the Room.

## Summary

| ### Public functions |
|---|---|
| `suspend https://developers.home.google.com/reference/kotlin/com/google/home/Room` | `https://developers.home.google.com/reference/kotlin/com/google/home/Room#setName(kotlin.String)(name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Sets the Room's name. |
| `suspend https://developers.home.google.com/reference/kotlin/com/google/home/Structure` | `https://developers.home.google.com/reference/kotlin/com/google/home/Room#structure()()` Gets the Room's `https://developers.home.google.com/reference/kotlin/com/google/home/Structure`. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/Room#name()` User-given name for the Room. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/Id` | `https://developers.home.google.com/reference/kotlin/com/google/home/Room#structureId()` The ID of the parent `https://developers.home.google.com/reference/kotlin/com/google/home/Structure` this Room is in. |

| ### Extension functions |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression<https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedEntity<https://developers.home.google.com/reference/kotlin/com/google/home/RoomType>>` | `https://developers.home.google.com/reference/kotlin/com/google/home/Room.https://developers.home.google.com/reference/kotlin/com/google/home/Room#(com.google.home.Room).atExecutionTime()()` An extension function of `https://developers.home.google.com/reference/kotlin/com/google/home/Room` that produces a `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression` of room entity. |

| ### Inherited functions |
|---|
| From [com.google.home.automation.HasCandidates](https://developers.home.google.com/reference/kotlin/com/google/home/automation/HasCandidates) |---|---| | `https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/NodeCandidate>>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/HasCandidates#allCandidates()()` Returns all the automation `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NodeCandidate` instances for the receiver and its child objects. | | `https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/NodeCandidate>>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/HasCandidates#candidates()()` Returns all the automation `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NodeCandidate` instances for the receiver. | |
| From [com.google.home.HasCustomAppData](https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#deleteValue(kotlin.String)(key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Deletes the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#deleteValue(kotlin.String)`. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#getValue(kotlin.String)(key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Retrieves the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#getValue(kotlin.String)`. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#updateValue(kotlin.String,kotlin.String)(key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Updates the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#updateValue(kotlin.String,kotlin.String)`. | |
| From [com.google.home.HasHomeDevices](https://developers.home.google.com/reference/kotlin/com/google/home/HasHomeDevices) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/HomeObjectsFlow<https://developers.home.google.com/reference/kotlin/com/google/home/HomeDevice>` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasHomeDevices#devices(kotlin.Boolean)(enableMultipartDevices: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Gets an observable flow of `https://developers.home.google.com/reference/kotlin/com/google/home/HomeDevice`s visible to the logged-in user, dependent on the context of the implementation (`https://developers.home.google.com/reference/kotlin/com/google/home/HomeManager`, `https://developers.home.google.com/reference/kotlin/com/google/home/Structure`, `https://developers.home.google.com/reference/kotlin/com/google/home/Room`). | |

| ### Inherited properties |
|---|
| From [com.google.home.HasId](https://developers.home.google.com/reference/kotlin/com/google/home/HasId) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/Id` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasId#id()` Opaque ID for the object. | |

## Public functions

### setName

```
suspend fun setName(name: String): Room
```

Sets the Room's name.

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The new name for the Room. |

| Returns |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/Room` | The updated Room. |

### structure

```
suspend fun structure(): Structure
```

Gets the Room's `https://developers.home.google.com/reference/kotlin/com/google/home/Structure`. A Room is always part of a Structure.

| Returns |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/Structure` | `https://developers.home.google.com/reference/kotlin/com/google/home/Structure` containing this Room. |

## Public properties

### name

```
val name: String
```

User-given name for the Room. Empty if not assigned.

### structureId

```
val structureId: Id
```

The ID of the parent `https://developers.home.google.com/reference/kotlin/com/google/home/Structure` this Room is in.

## Extension functions

### atExecutionTime

```
fun Room.atExecutionTime(): TypedExpression<TypedEntity<RoomType>>
```

An extension function of `https://developers.home.google.com/reference/kotlin/com/google/home/Room` that produces a `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression` of room entity.