@switchbot/homebridge-switchbot 1.5.1-beta.4 → 1.5.1-beta.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/config.schema.json +9 -0
  3. package/dist/devices/bots.d.ts +2 -0
  4. package/dist/devices/bots.d.ts.map +1 -1
  5. package/dist/devices/bots.js +51 -9
  6. package/dist/devices/bots.js.map +1 -1
  7. package/dist/devices/colorbulb.js +3 -3
  8. package/dist/devices/colorbulb.js.map +1 -1
  9. package/dist/devices/contact.d.ts +2 -0
  10. package/dist/devices/contact.d.ts.map +1 -1
  11. package/dist/devices/contact.js +21 -6
  12. package/dist/devices/contact.js.map +1 -1
  13. package/dist/devices/curtains.d.ts +2 -0
  14. package/dist/devices/curtains.d.ts.map +1 -1
  15. package/dist/devices/curtains.js +21 -6
  16. package/dist/devices/curtains.js.map +1 -1
  17. package/dist/devices/humidifiers.d.ts +2 -0
  18. package/dist/devices/humidifiers.d.ts.map +1 -1
  19. package/dist/devices/humidifiers.js +21 -6
  20. package/dist/devices/humidifiers.js.map +1 -1
  21. package/dist/devices/meters.d.ts +2 -0
  22. package/dist/devices/meters.d.ts.map +1 -1
  23. package/dist/devices/meters.js +20 -5
  24. package/dist/devices/meters.js.map +1 -1
  25. package/dist/devices/motion.d.ts +2 -0
  26. package/dist/devices/motion.d.ts.map +1 -1
  27. package/dist/devices/motion.js +20 -5
  28. package/dist/devices/motion.js.map +1 -1
  29. package/dist/devices/plugs.d.ts +2 -0
  30. package/dist/devices/plugs.d.ts.map +1 -1
  31. package/dist/devices/plugs.js +19 -4
  32. package/dist/devices/plugs.js.map +1 -1
  33. package/dist/irdevices/airconditioners.js +3 -3
  34. package/dist/irdevices/airconditioners.js.map +1 -1
  35. package/dist/irdevices/airpurifiers.js +3 -3
  36. package/dist/irdevices/airpurifiers.js.map +1 -1
  37. package/dist/irdevices/cameras.js +3 -3
  38. package/dist/irdevices/cameras.js.map +1 -1
  39. package/dist/irdevices/fans.js +3 -3
  40. package/dist/irdevices/fans.js.map +1 -1
  41. package/dist/irdevices/lights.js +3 -3
  42. package/dist/irdevices/lights.js.map +1 -1
  43. package/dist/irdevices/others.js +3 -3
  44. package/dist/irdevices/others.js.map +1 -1
  45. package/dist/irdevices/tvs.js +3 -3
  46. package/dist/irdevices/tvs.js.map +1 -1
  47. package/dist/irdevices/vacuumcleaners.js +3 -3
  48. package/dist/irdevices/vacuumcleaners.js.map +1 -1
  49. package/dist/irdevices/waterheaters.js +2 -2
  50. package/dist/irdevices/waterheaters.js.map +1 -1
  51. package/dist/settings.d.ts +1 -0
  52. package/dist/settings.d.ts.map +1 -1
  53. package/dist/settings.js.map +1 -1
  54. package/package.json +1 -1
  55. package/src/devices/bots.ts +51 -9
  56. package/src/devices/colorbulb.ts +3 -3
  57. package/src/devices/contact.ts +22 -6
  58. package/src/devices/curtains.ts +22 -6
  59. package/src/devices/humidifiers.ts +22 -6
  60. package/src/devices/meters.ts +21 -5
  61. package/src/devices/motion.ts +21 -5
  62. package/src/devices/plugs.ts +20 -4
  63. package/src/irdevices/airconditioners.ts +3 -3
  64. package/src/irdevices/airpurifiers.ts +3 -3
  65. package/src/irdevices/cameras.ts +3 -3
  66. package/src/irdevices/fans.ts +3 -3
  67. package/src/irdevices/lights.ts +3 -3
  68. package/src/irdevices/others.ts +3 -3
  69. package/src/irdevices/tvs.ts +3 -3
  70. package/src/irdevices/vacuumcleaners.ts +3 -3
  71. package/src/irdevices/waterheaters.ts +2 -2
  72. package/src/settings.ts +1 -0
@@ -79,16 +79,16 @@ export class Others {
79
79
  logs() {
80
80
  if (this.platform.debugMode) {
81
81
  this.deviceLogging = this.accessory.context.logging = 'debug';
82
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
82
+ this.warnLog(`Other: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
83
83
  } else if (this.device.logging) {
84
84
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
85
85
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
86
- this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
86
+ this.warnLog(`Other: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
87
87
  }
88
88
  } else if (this.platform.config.options?.logging) {
89
89
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
90
90
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
91
- this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
91
+ this.warnLog(`Other: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
92
92
  }
93
93
  } else {
94
94
  this.deviceLogging = this.accessory.context.logging = 'standard';
@@ -131,16 +131,16 @@ export class TV {
131
131
  logs() {
132
132
  if (this.platform.debugMode) {
133
133
  this.deviceLogging = this.accessory.context.logging = 'debug';
134
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
134
+ this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
135
135
  } else if (this.device.logging) {
136
136
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
137
137
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
138
- this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
138
+ this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
139
139
  }
140
140
  } else if (this.platform.config.options?.logging) {
141
141
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
142
142
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
143
- this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
143
+ this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
144
144
  }
145
145
  } else {
146
146
  this.deviceLogging = this.accessory.context.logging = 'standard';
@@ -60,16 +60,16 @@ export class VacuumCleaner {
60
60
  logs() {
61
61
  if (this.platform.debugMode) {
62
62
  this.deviceLogging = this.accessory.context.logging = 'debug';
63
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
63
+ this.warnLog(`Vacuum Cleaner: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
64
64
  } else if (this.device.logging) {
65
65
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
66
66
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
67
- this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
67
+ this.warnLog(`Vacuum Cleaner: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
68
68
  }
69
69
  } else if (this.platform.config.options?.logging) {
70
70
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
71
71
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
72
- this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
72
+ this.warnLog(`Vacuum Cleaner: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
73
73
  }
74
74
  } else {
75
75
  this.deviceLogging = this.accessory.context.logging = 'standard';
@@ -73,12 +73,12 @@ export class WaterHeater {
73
73
  } else if (this.device.logging) {
74
74
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
75
75
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
76
- this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
76
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
77
77
  }
78
78
  } else if (this.platform.config.options?.logging) {
79
79
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
80
80
  if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
81
- this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
81
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
82
82
  }
83
83
  } else {
84
84
  this.deviceLogging = this.accessory.context.logging = 'standard';
package/src/settings.ts CHANGED
@@ -50,6 +50,7 @@ export interface devicesConfig extends device {
50
50
  contact?: contact;
51
51
  colorbulb?: colorbulb;
52
52
  ble?: string;
53
+ scanDuration?: number;
53
54
  hide_device?: boolean;
54
55
  offline?: boolean;
55
56
  }