homey-api 3.4.7 → 3.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,7 +72,7 @@ class Device extends Item {
72
72
  // Schedule a refresh if it's been more than a second since the device has updated.
73
73
  const now = Date.now();
74
74
 
75
- if (this.__lastUpdated.getTime() + 1000 < now) {
75
+ if (this.__lastUpdated.getTime() + 2500 < now) {
76
76
  this.manager.scheduleRefresh();
77
77
  }
78
78
 
@@ -27,6 +27,7 @@ class ManagerDevices extends Manager {
27
27
  this.__pendingRefreshDevicesCall = this.getDevices({ $cache: false }).then(devices => {
28
28
  for (const device of Object.values(devices)) {
29
29
  device.refreshCapabilityInstances();
30
+ this.emit('device.update', device);
30
31
  }
31
32
  }).catch(err => {
32
33
  this.__debug('Failed to refresh devices.', err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "3.4.7",
3
+ "version": "3.4.8",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [