Skip to main content

Device instance events

Status has changed

ParameterTypeDescription
dataRecord<string, any>Raw JSON data retrieved from the device
stateChangedGovee.stateChangedOptionsArray with the things that changed, can include "onOff", "brightness" and "color"
device.on("updatedStatus", (data, stateChanged) =>
{
console.log(device.model + " state updated.", stateChanged + " got changed")
})

Device destroyed

device.on("destroyed", () =>
{
console.log(device.model + " state updated.", stateChanged + " got changed")
})