@switchbot/homebridge-switchbot 2.8.0-beta.18 → 2.8.0-beta.19

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.
Files changed (53) hide show
  1. package/dist/device/blindtilt.js.map +1 -1
  2. package/dist/device/bot.js.map +1 -1
  3. package/dist/device/ceilinglight.js.map +1 -1
  4. package/dist/device/colorbulb.js.map +1 -1
  5. package/dist/device/contact.js.map +1 -1
  6. package/dist/device/curtain.js.map +1 -1
  7. package/dist/device/hub.js.map +1 -1
  8. package/dist/device/humidifier.js.map +1 -1
  9. package/dist/device/iosensor.js.map +1 -1
  10. package/dist/device/lightstrip.js.map +1 -1
  11. package/dist/device/lock.js.map +1 -1
  12. package/dist/device/meter.js.map +1 -1
  13. package/dist/device/meterplus.js.map +1 -1
  14. package/dist/device/motion.js.map +1 -1
  15. package/dist/device/plug.js.map +1 -1
  16. package/dist/device/robotvacuumcleaner.js.map +1 -1
  17. package/dist/irdevice/airconditioner.js.map +1 -1
  18. package/dist/irdevice/airpurifier.js.map +1 -1
  19. package/dist/irdevice/camera.js.map +1 -1
  20. package/dist/irdevice/fan.js.map +1 -1
  21. package/dist/irdevice/light.js.map +1 -1
  22. package/dist/irdevice/other.js.map +1 -1
  23. package/dist/irdevice/tv.js.map +1 -1
  24. package/dist/irdevice/vacuumcleaner.js.map +1 -1
  25. package/dist/irdevice/waterheater.js.map +1 -1
  26. package/dist/platform.js.map +1 -1
  27. package/package.json +11 -11
  28. package/src/device/blindtilt.ts +2 -2
  29. package/src/device/bot.ts +2 -2
  30. package/src/device/ceilinglight.ts +5 -5
  31. package/src/device/colorbulb.ts +5 -5
  32. package/src/device/contact.ts +1 -1
  33. package/src/device/curtain.ts +2 -2
  34. package/src/device/hub.ts +1 -1
  35. package/src/device/humidifier.ts +4 -4
  36. package/src/device/iosensor.ts +1 -1
  37. package/src/device/lightstrip.ts +4 -4
  38. package/src/device/lock.ts +2 -2
  39. package/src/device/meter.ts +1 -1
  40. package/src/device/meterplus.ts +1 -1
  41. package/src/device/motion.ts +1 -1
  42. package/src/device/plug.ts +2 -2
  43. package/src/device/robotvacuumcleaner.ts +3 -3
  44. package/src/irdevice/airconditioner.ts +1 -1
  45. package/src/irdevice/airpurifier.ts +1 -1
  46. package/src/irdevice/camera.ts +1 -1
  47. package/src/irdevice/fan.ts +1 -1
  48. package/src/irdevice/light.ts +1 -1
  49. package/src/irdevice/other.ts +1 -1
  50. package/src/irdevice/tv.ts +1 -1
  51. package/src/irdevice/vacuumcleaner.ts +1 -1
  52. package/src/irdevice/waterheater.ts +1 -1
  53. package/src/platform.ts +1 -1
package/src/device/bot.ts CHANGED
@@ -564,7 +564,7 @@ export class Bot {
564
564
  headers: this.platform.generateHeaders(),
565
565
  });
566
566
  if (statusCode === 200) {
567
- const deviceStatus = await body.json();
567
+ const deviceStatus: any = await body.json();
568
568
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
569
569
  this.statusCode(statusCode);
570
570
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -729,7 +729,7 @@ export class Bot {
729
729
  method: 'POST',
730
730
  headers: this.platform.generateHeaders(),
731
731
  });
732
- const deviceStatus = await body.json();
732
+ const deviceStatus: any = await body.json();
733
733
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
734
734
  this.statusCode(statusCode);
735
735
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -406,7 +406,7 @@ export class CeilingLight {
406
406
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
407
407
  headers: this.platform.generateHeaders(),
408
408
  });
409
- const deviceStatus = await body.json();
409
+ const deviceStatus: any = await body.json();
410
410
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
411
411
  this.statusCode(statusCode);
412
412
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -528,7 +528,7 @@ export class CeilingLight {
528
528
  method: 'POST',
529
529
  headers: this.platform.generateHeaders(),
530
530
  });
531
- const deviceStatus = await body.json();
531
+ const deviceStatus: any = await body.json();
532
532
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
533
533
  this.statusCode(statusCode);
534
534
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -579,7 +579,7 @@ export class CeilingLight {
579
579
  method: 'POST',
580
580
  headers: this.platform.generateHeaders(),
581
581
  });
582
- const deviceStatus = await body.json();
582
+ const deviceStatus: any = await body.json();
583
583
  this.debugLog(`Devices: ${JSON.stringify(deviceStatus.body)}`);
584
584
  this.statusCode(statusCode);
585
585
  this.debugLog(`Headers: ${JSON.stringify(headers)}`);
@@ -615,7 +615,7 @@ export class CeilingLight {
615
615
  method: 'POST',
616
616
  headers: this.platform.generateHeaders(),
617
617
  });
618
- const deviceStatus = await body.json();
618
+ const deviceStatus: any = await body.json();
619
619
  this.debugLog(`Devices: ${JSON.stringify(deviceStatus.body)}`);
620
620
  this.statusCode(statusCode);
621
621
  this.debugLog(`Headers: ${JSON.stringify(headers)}`);
@@ -649,7 +649,7 @@ export class CeilingLight {
649
649
  method: 'POST',
650
650
  headers: this.platform.generateHeaders(),
651
651
  });
652
- const deviceStatus = await body.json();
652
+ const deviceStatus: any = await body.json();
653
653
  this.debugLog(`Devices: ${JSON.stringify(deviceStatus.body)}`);
654
654
  this.statusCode(statusCode);
655
655
  this.debugLog(`Headers: ${JSON.stringify(headers)}`);
@@ -441,7 +441,7 @@ export class ColorBulb {
441
441
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
442
442
  headers: this.platform.generateHeaders(),
443
443
  });
444
- const deviceStatus = await body.json();
444
+ const deviceStatus: any = await body.json();
445
445
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
446
446
  this.statusCode(statusCode);
447
447
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -699,7 +699,7 @@ export class ColorBulb {
699
699
  method: 'POST',
700
700
  headers: this.platform.generateHeaders(),
701
701
  });
702
- const deviceStatus = await body.json();
702
+ const deviceStatus: any = await body.json();
703
703
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
704
704
  this.statusCode(statusCode);
705
705
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -750,7 +750,7 @@ export class ColorBulb {
750
750
  method: 'POST',
751
751
  headers: this.platform.generateHeaders(),
752
752
  });
753
- const deviceStatus = await body.json();
753
+ const deviceStatus: any = await body.json();
754
754
  this.debugLog(`Devices: ${JSON.stringify(deviceStatus.body)}`);
755
755
  this.statusCode(statusCode);
756
756
  this.debugLog(`Headers: ${JSON.stringify(headers)}`);
@@ -786,7 +786,7 @@ export class ColorBulb {
786
786
  method: 'POST',
787
787
  headers: this.platform.generateHeaders(),
788
788
  });
789
- const deviceStatus = await body.json();
789
+ const deviceStatus: any = await body.json();
790
790
  this.debugLog(`Devices: ${JSON.stringify(deviceStatus.body)}`);
791
791
  this.statusCode(statusCode);
792
792
  this.debugLog(`Headers: ${JSON.stringify(headers)}`);
@@ -820,7 +820,7 @@ export class ColorBulb {
820
820
  method: 'POST',
821
821
  headers: this.platform.generateHeaders(),
822
822
  });
823
- const deviceStatus = await body.json();
823
+ const deviceStatus: any = await body.json();
824
824
  this.debugLog(`Devices: ${JSON.stringify(deviceStatus.body)}`);
825
825
  this.statusCode(statusCode);
826
826
  this.debugLog(`Headers: ${JSON.stringify(headers)}`);
@@ -400,7 +400,7 @@ export class Contact {
400
400
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
401
401
  headers: this.platform.generateHeaders(),
402
402
  });
403
- const deviceStatus = await body.json();
403
+ const deviceStatus: any = await body.json();
404
404
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
405
405
  this.statusCode(statusCode);
406
406
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -559,7 +559,7 @@ export class Curtain {
559
559
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
560
560
  headers: this.platform.generateHeaders(),
561
561
  });
562
- const deviceStatus = await body.json();
562
+ const deviceStatus: any = await body.json();
563
563
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
564
564
  this.statusCode(statusCode);
565
565
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -705,7 +705,7 @@ export class Curtain {
705
705
  method: 'POST',
706
706
  headers: this.platform.generateHeaders(),
707
707
  });
708
- const deviceStatus = await body.json();
708
+ const deviceStatus: any = await body.json();
709
709
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
710
710
  this.statusCode(statusCode);
711
711
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
package/src/device/hub.ts CHANGED
@@ -294,7 +294,7 @@ export class Hub {
294
294
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
295
295
  headers: this.platform.generateHeaders(),
296
296
  });
297
- const deviceStatus = await body.json();
297
+ const deviceStatus: any = await body.json();
298
298
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
299
299
  this.statusCode(statusCode);
300
300
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -379,7 +379,7 @@ export class Humidifier {
379
379
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
380
380
  headers: this.platform.generateHeaders(),
381
381
  });
382
- const deviceStatus = await body.json();
382
+ const deviceStatus: any = await body.json();
383
383
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
384
384
  this.statusCode(statusCode);
385
385
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -475,7 +475,7 @@ export class Humidifier {
475
475
  method: 'POST',
476
476
  headers: this.platform.generateHeaders(),
477
477
  });
478
- const deviceStatus = await body.json();
478
+ const deviceStatus: any = await body.json();
479
479
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
480
480
  this.statusCode(statusCode);
481
481
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -518,7 +518,7 @@ export class Humidifier {
518
518
  method: 'POST',
519
519
  headers: this.platform.generateHeaders(),
520
520
  });
521
- const deviceStatus = await body.json();
521
+ const deviceStatus: any = await body.json();
522
522
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
523
523
  this.statusCode(statusCode);
524
524
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -556,7 +556,7 @@ export class Humidifier {
556
556
  method: 'POST',
557
557
  headers: this.platform.generateHeaders(),
558
558
  });
559
- const deviceStatus = await body.json();
559
+ const deviceStatus: any = await body.json();
560
560
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
561
561
  this.statusCode(statusCode);
562
562
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -338,7 +338,7 @@ export class IOSensor {
338
338
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
339
339
  headers: this.platform.generateHeaders(),
340
340
  });
341
- const deviceStatus = await body.json();
341
+ const deviceStatus: any = await body.json();
342
342
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
343
343
  this.statusCode(statusCode);
344
344
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -381,7 +381,7 @@ export class StripLight {
381
381
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
382
382
  headers: this.platform.generateHeaders(),
383
383
  });
384
- const deviceStatus = await body.json();
384
+ const deviceStatus: any = await body.json();
385
385
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
386
386
  this.statusCode(statusCode);
387
387
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -594,7 +594,7 @@ export class StripLight {
594
594
  method: 'POST',
595
595
  headers: this.platform.generateHeaders(),
596
596
  });
597
- const deviceStatus = await body.json();
597
+ const deviceStatus: any = await body.json();
598
598
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
599
599
  this.statusCode(statusCode);
600
600
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -642,7 +642,7 @@ export class StripLight {
642
642
  method: 'POST',
643
643
  headers: this.platform.generateHeaders(),
644
644
  });
645
- const deviceStatus = await body.json();
645
+ const deviceStatus: any = await body.json();
646
646
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
647
647
  this.statusCode(statusCode);
648
648
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -676,7 +676,7 @@ export class StripLight {
676
676
  method: 'POST',
677
677
  headers: this.platform.generateHeaders(),
678
678
  });
679
- const deviceStatus = await body.json();
679
+ const deviceStatus: any = await body.json();
680
680
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
681
681
  this.statusCode(statusCode);
682
682
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -312,7 +312,7 @@ export class Lock {
312
312
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
313
313
  headers: this.platform.generateHeaders(),
314
314
  });
315
- const deviceStatus = await body.json();
315
+ const deviceStatus: any = await body.json();
316
316
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
317
317
  this.statusCode(statusCode);
318
318
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -421,7 +421,7 @@ export class Lock {
421
421
  method: 'POST',
422
422
  headers: this.platform.generateHeaders(),
423
423
  });
424
- const deviceStatus = await body.json();
424
+ const deviceStatus: any = await body.json();
425
425
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
426
426
  this.statusCode(statusCode);
427
427
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -344,7 +344,7 @@ export class Meter {
344
344
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
345
345
  headers: this.platform.generateHeaders(),
346
346
  });
347
- const deviceStatus = await body.json();
347
+ const deviceStatus: any = await body.json();
348
348
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
349
349
  this.statusCode(statusCode);
350
350
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -344,7 +344,7 @@ export class MeterPlus {
344
344
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
345
345
  headers: this.platform.generateHeaders(),
346
346
  });
347
- const deviceStatus = await body.json();
347
+ const deviceStatus: any = await body.json();
348
348
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
349
349
  this.statusCode(statusCode);
350
350
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -357,7 +357,7 @@ export class Motion {
357
357
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
358
358
  headers: this.platform.generateHeaders(),
359
359
  });
360
- const deviceStatus = await body.json();
360
+ const deviceStatus: any = await body.json();
361
361
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
362
362
  this.statusCode(statusCode);
363
363
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -265,7 +265,7 @@ export class Plug {
265
265
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
266
266
  headers: this.platform.generateHeaders(),
267
267
  });
268
- const deviceStatus = await body.json();
268
+ const deviceStatus: any = await body.json();
269
269
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
270
270
  this.statusCode(statusCode);
271
271
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -383,7 +383,7 @@ export class Plug {
383
383
  method: 'POST',
384
384
  headers: this.platform.generateHeaders(),
385
385
  });
386
- const deviceStatus = await body.json();
386
+ const deviceStatus: any = await body.json();
387
387
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
388
388
  this.statusCode(statusCode);
389
389
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -303,7 +303,7 @@ export class RobotVacuumCleaner {
303
303
  const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
304
304
  headers: this.platform.generateHeaders(),
305
305
  });
306
- const deviceStatus = await body.json();
306
+ const deviceStatus: any = await body.json();
307
307
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
308
308
  this.statusCode(statusCode);
309
309
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -422,7 +422,7 @@ export class RobotVacuumCleaner {
422
422
  method: 'POST',
423
423
  headers: this.platform.generateHeaders(),
424
424
  });
425
- const deviceStatus = await body.json();
425
+ const deviceStatus: any = await body.json();
426
426
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
427
427
  this.statusCode(statusCode);
428
428
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -451,7 +451,7 @@ export class RobotVacuumCleaner {
451
451
  method: 'POST',
452
452
  headers: this.platform.generateHeaders(),
453
453
  });
454
- const deviceStatus = await body.json();
454
+ const deviceStatus: any = await body.json();
455
455
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
456
456
  this.statusCode(statusCode);
457
457
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -262,7 +262,7 @@ export class AirConditioner {
262
262
  method: 'POST',
263
263
  headers: this.platform.generateHeaders(),
264
264
  });
265
- const deviceStatus = await body.json();
265
+ const deviceStatus: any = await body.json();
266
266
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
267
267
  this.statusCode(statusCode);
268
268
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -218,7 +218,7 @@ export class AirPurifier {
218
218
  method: 'POST',
219
219
  headers: this.platform.generateHeaders(),
220
220
  });
221
- const deviceStatus = await body.json();
221
+ const deviceStatus: any = await body.json();
222
222
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
223
223
  this.statusCode(statusCode);
224
224
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -123,7 +123,7 @@ export class Camera {
123
123
  method: 'POST',
124
124
  headers: this.platform.generateHeaders(),
125
125
  });
126
- const deviceStatus = await body.json();
126
+ const deviceStatus: any = await body.json();
127
127
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
128
128
  this.statusCode(statusCode);
129
129
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -243,7 +243,7 @@ export class Fan {
243
243
  method: 'POST',
244
244
  headers: this.platform.generateHeaders(),
245
245
  });
246
- const deviceStatus = await body.json();
246
+ const deviceStatus: any = await body.json();
247
247
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
248
248
  this.statusCode(statusCode);
249
249
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -147,7 +147,7 @@ export class Light {
147
147
  method: 'POST',
148
148
  headers: this.platform.generateHeaders(),
149
149
  });
150
- const deviceStatus = await body.json();
150
+ const deviceStatus: any = await body.json();
151
151
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
152
152
  this.statusCode(statusCode);
153
153
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -142,7 +142,7 @@ export class Others {
142
142
  method: 'POST',
143
143
  headers: this.platform.generateHeaders(),
144
144
  });
145
- const deviceStatus = await body.json();
145
+ const deviceStatus: any = await body.json();
146
146
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
147
147
  this.statusCode(statusCode);
148
148
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -375,7 +375,7 @@ export class TV {
375
375
  method: 'POST',
376
376
  headers: this.platform.generateHeaders(),
377
377
  });
378
- const deviceStatus = await body.json();
378
+ const deviceStatus: any = await body.json();
379
379
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
380
380
  this.statusCode(statusCode);
381
381
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -119,7 +119,7 @@ export class VacuumCleaner {
119
119
  method: 'POST',
120
120
  headers: this.platform.generateHeaders(),
121
121
  });
122
- const deviceStatus = await body.json();
122
+ const deviceStatus: any = await body.json();
123
123
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
124
124
  this.statusCode(statusCode);
125
125
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
@@ -128,7 +128,7 @@ export class WaterHeater {
128
128
  method: 'POST',
129
129
  headers: this.platform.generateHeaders(),
130
130
  });
131
- const deviceStatus = await body.json();
131
+ const deviceStatus: any = await body.json();
132
132
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Devices: ${JSON.stringify(deviceStatus.body)}`);
133
133
  this.statusCode(statusCode);
134
134
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Headers: ${JSON.stringify(headers)}`);
package/src/platform.ts CHANGED
@@ -301,7 +301,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
301
301
  headers: this.generateHeaders(),
302
302
  });
303
303
  if (statusCode === 200) {
304
- const devicesAPI = await body.json();
304
+ const devicesAPI: any = await body.json();
305
305
  this.debugLog(`Devices: ${JSON.stringify(devicesAPI.body)}`);
306
306
  this.debugLog(`Headers: ${JSON.stringify(headers)}`);
307
307
  // SwitchBot Devices