Button Trait (bttn)

A button that can be pressed.

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

State Properties

NameKeyRWReqDescription
Values/bttn/vX?XButton State
PressCounts/bttn/c_dnXXThe number of times this button has been pressed.
ReleaseCounts/bttn/c_upXXThe number of times this button has been released.
Lasts/bttn/lastXThe number of seconds ago that this button was pressed or released.

s/bttn/v : Value

Button State.

AttributeValue
Value Typeboolean
FlagsREQ, GET, OPT_SET, OBS

true while the button is pressed, false while the button is released.

s/bttn/c_dn : PressCount

The number of times this button has been pressed.

AttributeValue
Value Typeinteger
FlagsREQ, GET, RESET, OBS

This count may be reset by setting it to zero. The count is not preserved across power cycles.

s/bttn/c_up : ReleaseCount

The number of times this button has been released.

AttributeValue
Value Typeinteger
FlagsREQ, GET, RESET, OBS

This count may be reset by setting it to zero. The count is not preserved across power cycles.

s/bttn/last : Last

The number of seconds ago that this button was pressed or released.

AttributeValue
Value Typeinteger
FlagsGET, NO_SET, OBS, VOLATILE

This value is not cacheable. Observing it will only indicate when the value is reset to zero.

Metadata Properties

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

m/bttn/turi : TraitURI

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

AttributeValue
Value TypeURI-reference
FlagsCONST, REQ