@switchbot/homebridge-switchbot 2.5.3-beta.14 → 2.5.3-beta.16

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 (58) hide show
  1. package/dist/device/blindtilt.d.ts +1 -1
  2. package/dist/device/blindtilt.d.ts.map +1 -1
  3. package/dist/device/blindtilt.js +4 -6
  4. package/dist/device/blindtilt.js.map +1 -1
  5. package/dist/device/bot.d.ts +1 -1
  6. package/dist/device/bot.d.ts.map +1 -1
  7. package/dist/device/bot.js +4 -6
  8. package/dist/device/bot.js.map +1 -1
  9. package/dist/device/ceilinglight.d.ts +1 -1
  10. package/dist/device/ceilinglight.d.ts.map +1 -1
  11. package/dist/device/ceilinglight.js +4 -6
  12. package/dist/device/ceilinglight.js.map +1 -1
  13. package/dist/device/colorbulb.d.ts +1 -1
  14. package/dist/device/colorbulb.d.ts.map +1 -1
  15. package/dist/device/colorbulb.js +4 -6
  16. package/dist/device/colorbulb.js.map +1 -1
  17. package/dist/device/curtain.d.ts +1 -1
  18. package/dist/device/curtain.d.ts.map +1 -1
  19. package/dist/device/curtain.js +4 -6
  20. package/dist/device/curtain.js.map +1 -1
  21. package/dist/device/iosensor.d.ts +1 -0
  22. package/dist/device/iosensor.d.ts.map +1 -1
  23. package/dist/device/iosensor.js +49 -59
  24. package/dist/device/iosensor.js.map +1 -1
  25. package/dist/device/meterplus.d.ts +1 -0
  26. package/dist/device/meterplus.d.ts.map +1 -1
  27. package/dist/device/meterplus.js +1 -3
  28. package/dist/device/meterplus.js.map +1 -1
  29. package/dist/device/motion.d.ts +1 -1
  30. package/dist/device/motion.d.ts.map +1 -1
  31. package/dist/device/motion.js +4 -6
  32. package/dist/device/motion.js.map +1 -1
  33. package/dist/device/plug.d.ts +1 -1
  34. package/dist/device/plug.d.ts.map +1 -1
  35. package/dist/device/plug.js +4 -6
  36. package/dist/device/plug.js.map +1 -1
  37. package/dist/device/robotvacuumcleaner.d.ts +1 -1
  38. package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
  39. package/dist/device/robotvacuumcleaner.js +4 -6
  40. package/dist/device/robotvacuumcleaner.js.map +1 -1
  41. package/dist/device/striplight.d.ts +1 -1
  42. package/dist/device/striplight.d.ts.map +1 -1
  43. package/dist/device/striplight.js +4 -6
  44. package/dist/device/striplight.js.map +1 -1
  45. package/homebridge-ui/public/index.html +1 -1
  46. package/package.json +1 -1
  47. package/src/device/blindtilt.ts +4 -6
  48. package/src/device/bot.ts +4 -6
  49. package/src/device/ceilinglight.ts +4 -6
  50. package/src/device/colorbulb.ts +4 -6
  51. package/src/device/curtain.ts +4 -6
  52. package/src/device/iosensor.ts +47 -54
  53. package/src/device/meterplus.ts +2 -3
  54. package/src/device/motion.ts +4 -6
  55. package/src/device/plug.ts +4 -6
  56. package/src/device/robotvacuumcleaner.ts +4 -6
  57. package/src/device/striplight.ts +4 -6
  58. package/src/settings.ts +3 -3
@@ -467,7 +467,7 @@ export class StripLight {
467
467
  .then(async (device_list: any) => {
468
468
  this.infoLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.On}`);
469
469
  return await this.retry({
470
- max: await this.maxRetry(),
470
+ max: this.maxRetry(),
471
471
  fn: async () => {
472
472
  if (this.On) {
473
473
  return await device_list[0].turnOn({ id: this.device.bleMac });
@@ -898,14 +898,12 @@ export class StripLight {
898
898
  });
899
899
  }
900
900
 
901
- async maxRetry(): Promise<number> {
902
- let maxRetry: number;
901
+ maxRetry(): number {
903
902
  if (this.device.maxRetry) {
904
- maxRetry = this.device.maxRetry;
903
+ return this.device.maxRetry;
905
904
  } else {
906
- maxRetry = 5;
905
+ return 5;
907
906
  }
908
- return maxRetry;
909
907
  }
910
908
 
911
909
  minStep(device: device & devicesConfig): number {
package/src/settings.ts CHANGED
@@ -259,8 +259,8 @@ calibrate?: boolean; //determines if device has been calibrated or not. (Used by
259
259
  group?: boolean; //determines if a device is paired with or grouped with another device or not. (Used by the following deviceTypes: Curtain, Blind Tilt)
260
260
  moving?: boolean; //determines if a device is moving or not. (Used by the following deviceTypes: Curtain, Blind Tilt)
261
261
  slidePosition?: number;//the current position (0-100) the percentage of the distance between the calibrated open position and closed position. (Used by the following deviceTypes: Curtain, Blind Tilt)
262
- temperature?: number; //temperature in celsius (Used by the following deviceTypes: Meter, Meter Plus, Humidifier)
263
- humidity?: number; //humidity percentage. (Used by the following deviceTypes: Meter, Meter Plus, Humidifier)
262
+ temperature?: number; //temperature in celsius (Used by the following deviceTypes: Meter, Meter Plus, Humidifier, IOSensor)
263
+ humidity?: number; //humidity percentage. (Used by the following deviceTypes: Meter, Meter Plus, Humidifier, IOSensor)
264
264
  lockState?: string; //determines if locked or not. (Used by the following deviceTypes: Lock)
265
265
  doorState?: string; //determines if the door is closed or not. (Used by the following deviceTypes: Lock)
266
266
  moveDetected?: boolean; //determines if motion is detected. (Used by the following deviceTypes: Motion Sensor, Contact Sensor)
@@ -274,7 +274,7 @@ electricCurrent?: number; //the current of the device at the moment, measured in
274
274
  color?: string; //the color value, RGB "255:255:255". (Used by the following deviceTypes: Strip Light, Color Bulb)
275
275
  workingStatus?: string; //the working status of the device. StandBy, Clearing, Paused, GotoChargeBase, Charging, ChargeDone, Dormant, InTrouble, InRemoteControl, or InDustCollecting. (Used by the following deviceTypes: Robot Vacuum Cleaner S1, Robot Vacuum Cleaner S1 Plus)
276
276
  onlineStatus?: string; //the connection status of the device. online or offline. (Used by the following deviceTypes: Robot Vacuum Cleaner S1, Robot Vacuum Cleaner S1 Plus)
277
- battery?: number; //the current battery level. (Used by the following deviceTypes: Robot Vacuum Cleaner S1, Robot Vacuum Cleaner S1 Plus, Blind Tilt)
277
+ battery?: number; //the current battery level. (Used by the following deviceTypes: Robot Vacuum Cleaner S1, Robot Vacuum Cleaner S1 Plus, Blind Tilt, IOSensor)
278
278
  deviceName?: string; //device name. (Used by the following deviceTypes: Robot Vacuum Cleaner S1 Plus)
279
279
  nebulizationEfficiency?: number; //atomization efficiency percentage. (Used by the following deviceTypes: Humidifier)
280
280
  auto?: boolean; //determines if a Humidifier is in Auto Mode or not. (Used by the following deviceTypes: Humidifier)