OnOff Trait (onof)

On/Off.

AttributeValue
Idtag:google.com,2018:m2m:traits:on_off:v1:v0#r0
Short-Idonof
Has-Childrenno

Implemented by things that can be turned on or off, such as a light bulb or a power controller.

State Properties

NameKeyRWReqDescription
Values/onof/v??XOn/Off state as a boolean

s/onof/v : Value

On/Off state as a boolean.

AttributeValue
Value Typeboolean
FlagsREQ, OPT_GET, OPT_SET, OBS

On is true, off is false

Config Properties

NameKeyRWReqDescription
DurationOffc/onof/doffX?Default duration (in seconds) for transitions from 'on' to 'off'
DurationOnc/onof/donX?Default duration (in seconds) for transitions from 'off' to 'on'
SceneIdOnc/onof/sconX?Power-on scene.
IsLuminaryc/onof/lumiX?Flag for indicating if this thing is controlling a Luminary (light)

c/onof/doff : DurationOff

Default duration (in seconds) for transitions from 'on' to 'off'.

AttributeValue
Value Typereal number
FlagsGET, OPT_SET, OBS

Indicates the default duration (in seconds) when transitioning from the 'on' state to the 'off' state. This property is only present on things which also have the Transition trait.

c/onof/don : DurationOn

Default duration (in seconds) for transitions from 'off' to 'on'.

AttributeValue
Value Typereal number
FlagsEXPERIMENTAL, GET, OPT_SET, OBS

Indicates the default duration (in seconds) when transitioning from the 'off' state to the 'on' state. This property is only present on things which also have the Transition trait.

c/onof/scon : SceneIdOn

Power-on scene.

AttributeValue
Value Typetext string
FlagsEXPERIMENTAL, GET, OPT_SET, OBS

Indicates the scene to recall when the device is physically powered on or rebooted. On some types of devices this may be read-only. Only present on things that also implement the Scene trait.

c/onof/lumi : IsLuminary

Flag for indicating if this thing is controlling a Luminary (light).

AttributeValue
Value Typeboolean
FlagsEXPERIMENTAL, GET, OPT_SET, OBS

This property allows a thing that controls a generic load (Like a smart power switch) to be explicitly identified as controlling a luminary (a light that is used for illumination). If this is set to true, this thing will be included in the “luminaries” group. If this thing implements the Luminary trait, then this thing is already assumed to be a luminary and this property MUST NOT be present.

Metadata Properties

NameKeyRWReqDescription
TraitURIm/onof/turiXXThe URI that uniquely identifies the specification used to implement this trait.

m/onof/turi : TraitURI

The URI that uniquely identifies the specification used to implement this trait.

AttributeValue
Value TypeURI-reference
FlagsCONST, REQ