@switchbot/homebridge-switchbot 2.8.1-beta.15 → 2.8.1-beta.17
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.
- package/CHANGELOG.md +8 -0
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +20 -13
- package/dist/device/bot.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +46 -23
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +4 -3
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/bot.ts +20 -13
- package/src/device/colorbulb.ts +45 -23
- package/src/platform.ts +4 -3
package/src/platform.ts
CHANGED
|
@@ -302,13 +302,13 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
302
302
|
});
|
|
303
303
|
this.debugWarnLog(`body: ${JSON.stringify(body)}`);
|
|
304
304
|
this.debugWarnLog(`statusCode: ${statusCode}`);
|
|
305
|
-
this.debugWarnLog(`headers: ${headers}`);
|
|
305
|
+
this.debugWarnLog(`headers: ${JSON.stringify(headers)}`);
|
|
306
306
|
const devicesAPI: any = await body.json();
|
|
307
307
|
this.debugWarnLog(`devicesAPI: ${JSON.stringify(devicesAPI)}`);
|
|
308
|
-
this.debugWarnLog(`devicesAPI Length: ${devicesAPI.length}`);
|
|
309
308
|
this.debugWarnLog(`devicesAPI Body: ${JSON.stringify(devicesAPI.body)}`);
|
|
310
309
|
this.debugWarnLog(`devicesAPI StatusCode: ${devicesAPI.statusCode}`);
|
|
311
|
-
if ((
|
|
310
|
+
if ((statusCode === 200 || statusCode === 100) && (devicesAPI.statusCode === 200 || devicesAPI.statusCode === 100)) {
|
|
311
|
+
this.debugErrorLog(`statusCode: ${statusCode} & devicesAPI StatusCode: ${devicesAPI.statusCode}`);
|
|
312
312
|
// SwitchBot Devices
|
|
313
313
|
const deviceLists = devicesAPI.body.deviceList;
|
|
314
314
|
this.debugWarnLog(`DeviceLists: ${JSON.stringify(deviceLists)}`);
|
|
@@ -399,6 +399,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
399
399
|
this.debugLog(`Total IR Devices Found: ${devicesAPI.body.infraredRemoteList.length}`);
|
|
400
400
|
}
|
|
401
401
|
} else {
|
|
402
|
+
this.statusCode(statusCode);
|
|
402
403
|
this.statusCode(devicesAPI.statusCode);
|
|
403
404
|
}
|
|
404
405
|
} catch (e: any) {
|