Skip to main content

Govee instance events

Server/client Ready

govee.on("ready", (device) => {
console.log("Server and client are ready to go!");
});

New device found

ParameterTypeDescription
deviceGovee.DeviceThe device that had it's state changed
govee.on("deviceAdded", (device) => {
console.log("New Device!", device.model);
});

Device removed

ParameterTypeDescription
deviceGovee.DeviceThe device that had it's state changed
govee.on("deviceRemoved", (device) => {
console.log("Device removed", device.model);
});

Device state updated

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