Time

class Time : PlatformTrait, TimeTrait.Attributes


Used in the Starter in conjunction with a Structure to represent time at that structure location. Internally, this is represented as a Unix timestamp, (milliseconds since midnight, January 1, 1970). In addition, this may also represent the current sunrise or sunset time for the current location.

Summary

Nested types

Descriptor enum for this trait's attributes.

An event which is sent at a pre-scheduled time.

Public properties

open TraitFactory<Time>

Inherited functions

From com.google.home.google.PlatformTrait
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)

Inherited properties

From com.google.home.google.PlatformTrait
From com.google.home.google.TimeTrait.Attributes
open LocalDate?

The current date.

open LocalTime?

The current time.

open DayOfWeek?

The current day of the week.

open LocalTime?

The time when sunrise occurs.

open LocalTime?

The time when sunset occurs.

Public properties

factory

open val factoryTraitFactory<Time>