Skip to main content
Version: v1.0

STRESS

danger

STRESS sensor is temporarily unavailable

Creating Sensors

const stress = hmSensor.createSensor(hmSensor.id.STRESS)

console.log(stress.current)
console.log(stress.time)

STRESS instance

stress: object

PropertiesDescriptionType
currentcurrent pressure valuenumber
timetime when the pressure value was generatednumber

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

stress.addEventListener(hmSensor.event.CHANGE, function () {
console.log(stress.current)

console.log('the stress time: ' + stress.time + ' stress: ' + stress.current + '\r\n')
})