homey-api 1.10.2 → 1.10.5

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.
@@ -82,6 +82,28 @@
82
82
  }
83
83
  }
84
84
  },
85
+ "searchAppsBy433MhzSignal": {
86
+ "path": "/app/search-signal-rf433",
87
+ "method": "get",
88
+ "parameters": {
89
+ "language": {
90
+ "in": "query",
91
+ "type": "string"
92
+ },
93
+ "homeyVersion": {
94
+ "type": "string",
95
+ "in": "body"
96
+ },
97
+ "homeyPlatform": {
98
+ "type": "string",
99
+ "in": "body"
100
+ },
101
+ "payload": {
102
+ "type": "array",
103
+ "in": "body"
104
+ }
105
+ }
106
+ },
85
107
  "browseApps": {
86
108
  "path": "/app/browse",
87
109
  "method": "get",
@@ -221,6 +221,37 @@
221
221
 
222
222
 
223
223
 
224
+ ):
225
+ Promise<any>;
226
+
227
+ searchAppsBy433MhzSignal(
228
+
229
+
230
+
231
+
232
+ opts: {
233
+
234
+
235
+ language: string,
236
+
237
+
238
+
239
+ homeyVersion: string,
240
+
241
+
242
+
243
+ homeyPlatform: string,
244
+
245
+
246
+
247
+ payload: Array<any>,
248
+
249
+
250
+ },
251
+
252
+
253
+
254
+
224
255
  ):
225
256
  Promise<any>;
226
257
 
@@ -105,14 +105,13 @@ class Device extends Item {
105
105
  }
106
106
 
107
107
  onReconnect() {
108
- const capabilityInstances = this.__capabilityInstances;
109
- if (Object.keys(capabilityInstances).length > 0) {
108
+ if (Object.keys(this.__capabilityInstances).length > 0) {
110
109
  // Get the device's latest values
111
110
  // TODO: Optimize this with `getDevices()` when >1 device has >0 capability instances.
112
111
  this.manager.getDevice({
113
112
  id: this.id,
114
113
  }).then(async device => {
115
- Object.entries(capabilityInstances).forEach(([capabilityId, capabilityInstance]) => {
114
+ Object.entries(this.__capabilityInstances).forEach(([capabilityId, capabilityInstance]) => {
116
115
  const value = device.capabilitiesObj
117
116
  ? typeof device.capabilitiesObj[capabilityId] !== 'undefined'
118
117
  ? device.capabilitiesObj[capabilityId].value
@@ -342,8 +342,10 @@ class Manager extends EventEmitter {
342
342
  }
343
343
  }
344
344
 
345
- // Mark cache as complete
346
- this.__cacheAllComplete[itemId] = true;
345
+ if (this.isConnected()) {
346
+ // Mark cache as complete
347
+ this.__cacheAllComplete[itemId] = true;
348
+ }
347
349
 
348
350
  break;
349
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "1.10.2",
3
+ "version": "1.10.5",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [