Closed Maxmudjon closed 5 years ago
` async event() { let api = await this.getApi();
api.devices.on("capability.update", device => { this.log("Capability updated!", device); }); api.devices.on("device.update", device => { this.log("Device updated!", device); });
} `
device.update is works capability.update don't works
found
let device = await api.devices.getDevice({ id: deviceID });
device.makeCapabilityInstance(capabilityName, async variable => { this.log("Capability changed: ", variable); });
device.makeCapabilityInstance(capabilityName, async variable => {
this.log("Capability changed: ", variable);
});
` async event() { let api = await this.getApi();
} `
device.update is works capability.update don't works