Room

interface Room : HasId, HasHomeDevices, HasCandidates, HasCustomAppData


An object that represents a Room in a Structure. Implements HasHomeDevices that returns all devices within the Room.

Summary

Public functions

suspend Room
setName(name: String)

Sets the Room's name.

suspend Structure

Gets the Room's Structure.

Public properties

String

User-given name for the Room.

Id

The ID of the parent Structure this Room is in.

Extension functions

TypedExpression<TypedEntity<RoomType>>

An extension function of Room that produces a TypedExpression of room entity.

Inherited functions

From com.google.home.automation.HasCandidates
Flow<Set<NodeCandidate>>

Returns all the automation NodeCandidate instances for the receiver and its child objects.

Flow<Set<NodeCandidate>>

Returns all the automation NodeCandidate instances for the receiver.

From com.google.home.HasCustomAppData
suspend Unit

Deletes the value associated with the given key.

suspend String?

Retrieves the value associated with the given key.

suspend Unit
updateValue(key: String, value: String)

Updates the value associated with the given key.

From com.google.home.HasHomeDevices
HomeObjectsFlow<HomeDevice>

Gets an observable flow of HomeDevices visible to the logged-in user, dependent on the context of the implementation (HomeManager, Structure, Room).

Inherited properties

From 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: String

The new name for the Room.

Returns
Room

The updated Room.

structure

suspend fun structure(): Structure

Gets the Room's Structure. A Room is always part of a Structure.

Returns
Structure

Structure containing this Room.

Public properties

name

val nameString

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

structureId

val structureIdId

The ID of the parent Structure this Room is in.

Extension functions

atExecutionTime

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

An extension function of Room that produces a TypedExpression of room entity.