athombv / homey-web-api-issues

This issue tracker is for Homey Developers using the Web API.
4 stars 1 forks source link

I cannot subscribe to capability.update events #11

Closed Maxmudjon closed 5 years ago

Maxmudjon commented 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

Maxmudjon commented 5 years ago

found

let device = await api.devices.getDevice({ id: deviceID });

device.makeCapabilityInstance(capabilityName, async variable => { this.log("Capability changed: ", variable); });