EnergyPreference

interface EnergyPreference : EnergyPreferenceTrait.Attributes, MatterTrait, Updatable


API for the EnergyPreference trait. This trait provides an interface to specify preferences for how devices should consume energy.

Summary

Nested types

Descriptor enum for this trait's attributes.

Public functions

Boolean

Public properties

open TraitFactory<EnergyPreference>

Inherited functions

From com.google.home.TraitStateInvalidation
suspend Unit
From com.google.home.Updatable
suspend EnergyPreference

Creates a mutable copy of an object and calls the given function to mutate it, then saves it and returns a new immutable copy with the updated state.

Inherited properties

From com.google.home.matter.standard.EnergyPreferenceTrait.Attributes
List<UInt>

A list of client-generated commands which are supported by this cluster server instance.

List<UInt>

A list of the attribute IDs of the attributes supported by the cluster instance.

UShort

The revision of the server cluster specification supported by the cluster instance.

UByte?

The current preference of the user for balancing different priorities during device use.

UByte?

The current preference of the user for how quickly a device should enter low power mode.

List<EnergyPreferenceTrait.BalanceStruct>?

A list of at least two BalanceStructs, each representing a step along a linear scale of relative priorities.

List<EnergyPreferenceTrait.EnergyPriorityEnum>?

Two extremes for interpreting the values in the energyBalances attribute.

EnergyPreferenceTrait.Feature

Whether the server supports zero or more optional cluster features.

List<UInt>

A list of server-generated commands (server to client) which are supported by this cluster server instance.

List<EnergyPreferenceTrait.BalanceStruct>?

A list of at least two BalanceStructs, each representing a condition or set of conditions for the device to enter low-power mode.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: EnergyPreference.Attribute): Boolean

Public properties

factory

open val factoryTraitFactory<EnergyPreference>