Skip to main content
Version: v2

STAND

Creating Sensors​

const stand = hmSensor.createSensor(hmSensor.id.STAND)

console.log(stand.current)

STAND instance​

stand: object​

PropertiesDescriptionType
currentcurrent standing hoursnumber
targetstanding hours targetnumber

Registering sensor instance callback events​

calorie.addEventListener(event, callback: Callback)

The events of CHANGE​

The value of event​

hmSensor.event.CHANGE

Callback​

() => void

The example of events​

stand.addEventListener(hmSensor.event.CHANGE, function () {
console.log('the current stand: ' + stand.current + ' target: ' + stand.target + '\r\n')
})