AreaPresenceState

class AreaPresenceState : PlatformTrait, AreaPresenceStateTrait.Attributes, Updatable


This trait provides an interface for the current area presence state for a given Structure, for example, home or away, occupied or unoccupied. Only for use with automations.

Summary

Nested types

Descriptor enum for this trait's attributes.

Public functions

open suspend AreaPresenceState

Updater function to modify any writable attributes.

Public properties

open TraitFactory<AreaPresenceState>

Inherited functions

From com.google.home.google.PlatformTrait
ObjectCommand
<REQUEST : Any?> createObjectCommand(
    commandId: String,
    request: PlatformTraitPayload<REQUEST>
)
suspend Unit
sendCommand(commandId: String)
suspend Unit
<REQUEST : Any?> sendCommand(
    commandId: String,
    request: PlatformTraitPayload<REQUEST>
)
suspend RESPONSE
<RESPONSE : Any?> sendCommand(
    commandId: String,
    responseParser: Parser<RESPONSE>
)
suspend RESPONSE
<REQUEST : Any?, RESPONSE : Any?> sendCommand(
    commandId: String,
    request: PlatformTraitPayload<REQUEST>,
    responseParser: Parser<RESPONSE>
)
suspend Unit
<T : Any?> write(parser: Parser<T>, attributes: T, useTimedInteraction: Boolean)

Public functions

update

open suspend fun update(optimisticReturn: (AreaPresenceState) -> Unit, init: AreaPresenceStateTrait.MutableAttributes.() -> Unit): AreaPresenceState

Updater function to modify any writable attributes.

Public properties

factory

open val factory: TraitFactory<AreaPresenceState>