athombv / homey-web-api-issues

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

ManagerDevices.getDevice not updating capabilitiesObj in real time #12

Closed gruijter closed 3 years ago

gruijter commented 4 years ago

athom api: 2.1.220 homey fw: 3.1.0

const device = await this.api.devices.getDevice(id);

results in a device instance of which the capabilitiesObj is not updated on every change in capability. It seems to be updated only a few times per hour. This means the capability values do not reflect the actual values of the device.

WeeJeWel commented 3 years ago

You should use Device.makeCapabilityInstance to get the latest values of value and lastChanged.