@switchbot/homebridge-switchbot 3.5.0-beta.40 → 3.5.0-beta.42

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 (81) hide show
  1. package/dist/device/blindtilt.d.ts.map +1 -1
  2. package/dist/device/blindtilt.js +2 -1
  3. package/dist/device/blindtilt.js.map +1 -1
  4. package/dist/device/bot.d.ts.map +1 -1
  5. package/dist/device/bot.js +2 -1
  6. package/dist/device/bot.js.map +1 -1
  7. package/dist/device/ceilinglight.d.ts.map +1 -1
  8. package/dist/device/ceilinglight.js +2 -1
  9. package/dist/device/ceilinglight.js.map +1 -1
  10. package/dist/device/colorbulb.d.ts.map +1 -1
  11. package/dist/device/colorbulb.js +2 -1
  12. package/dist/device/colorbulb.js.map +1 -1
  13. package/dist/device/contact.d.ts.map +1 -1
  14. package/dist/device/contact.js +2 -1
  15. package/dist/device/contact.js.map +1 -1
  16. package/dist/device/curtain.d.ts.map +1 -1
  17. package/dist/device/curtain.js +2 -1
  18. package/dist/device/curtain.js.map +1 -1
  19. package/dist/device/device.d.ts.map +1 -1
  20. package/dist/device/device.js +1 -2
  21. package/dist/device/device.js.map +1 -1
  22. package/dist/device/fan.d.ts.map +1 -1
  23. package/dist/device/fan.js +3 -2
  24. package/dist/device/fan.js.map +1 -1
  25. package/dist/device/hub.d.ts.map +1 -1
  26. package/dist/device/hub.js +2 -1
  27. package/dist/device/hub.js.map +1 -1
  28. package/dist/device/humidifier.d.ts.map +1 -1
  29. package/dist/device/humidifier.js +2 -1
  30. package/dist/device/humidifier.js.map +1 -1
  31. package/dist/device/iosensor.d.ts.map +1 -1
  32. package/dist/device/iosensor.js +2 -1
  33. package/dist/device/iosensor.js.map +1 -1
  34. package/dist/device/lightstrip.d.ts.map +1 -1
  35. package/dist/device/lightstrip.js +2 -1
  36. package/dist/device/lightstrip.js.map +1 -1
  37. package/dist/device/lock.d.ts.map +1 -1
  38. package/dist/device/lock.js +2 -1
  39. package/dist/device/lock.js.map +1 -1
  40. package/dist/device/meter.d.ts.map +1 -1
  41. package/dist/device/meter.js +2 -1
  42. package/dist/device/meter.js.map +1 -1
  43. package/dist/device/meterplus.d.ts.map +1 -1
  44. package/dist/device/meterplus.js +2 -1
  45. package/dist/device/meterplus.js.map +1 -1
  46. package/dist/device/motion.d.ts.map +1 -1
  47. package/dist/device/motion.js +2 -1
  48. package/dist/device/motion.js.map +1 -1
  49. package/dist/device/plug.d.ts.map +1 -1
  50. package/dist/device/plug.js +2 -1
  51. package/dist/device/plug.js.map +1 -1
  52. package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
  53. package/dist/device/robotvacuumcleaner.js +2 -1
  54. package/dist/device/robotvacuumcleaner.js.map +1 -1
  55. package/dist/device/waterdetector.d.ts.map +1 -1
  56. package/dist/device/waterdetector.js +2 -1
  57. package/dist/device/waterdetector.js.map +1 -1
  58. package/dist/platform.d.ts.map +1 -1
  59. package/dist/platform.js +1 -0
  60. package/dist/platform.js.map +1 -1
  61. package/package.json +1 -1
  62. package/src/device/blindtilt.ts +2 -1
  63. package/src/device/bot.ts +2 -1
  64. package/src/device/ceilinglight.ts +2 -1
  65. package/src/device/colorbulb.ts +2 -1
  66. package/src/device/contact.ts +2 -1
  67. package/src/device/curtain.ts +2 -1
  68. package/src/device/device.ts +1 -2
  69. package/src/device/fan.ts +3 -2
  70. package/src/device/hub.ts +2 -1
  71. package/src/device/humidifier.ts +2 -1
  72. package/src/device/iosensor.ts +2 -1
  73. package/src/device/lightstrip.ts +2 -1
  74. package/src/device/lock.ts +2 -1
  75. package/src/device/meter.ts +2 -1
  76. package/src/device/meterplus.ts +2 -1
  77. package/src/device/motion.ts +2 -1
  78. package/src/device/plug.ts +2 -1
  79. package/src/device/robotvacuumcleaner.ts +2 -1
  80. package/src/device/waterdetector.ts +2 -1
  81. package/src/platform.ts +1 -0
@@ -72,8 +72,7 @@ export abstract class deviceBase {
72
72
  .setCharacteristic(this.hap.Characteristic.Model, accessory.context.model)
73
73
  .setCharacteristic(this.hap.Characteristic.SerialNumber, accessory.context.deviceId)
74
74
  .setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.version)
75
- .getCharacteristic(this.hap.Characteristic.FirmwareRevision)
76
- .updateValue(accessory.context.version);
75
+ .setCharacteristic(this.hap.Characteristic.HardwareRevision, accessory.context.version);
77
76
  }
78
77
 
79
78
  async getDeviceLogSettings(device: device & devicesConfig): Promise<void> {
package/src/device/fan.ts CHANGED
@@ -118,7 +118,7 @@ export class Fan extends deviceBase {
118
118
  // BatteryLevel
119
119
  this.Battery.BatteryLevel = battery;
120
120
 
121
- // FirmwareRevision
121
+ // Firmware Version
122
122
  if (version) {
123
123
  this.accessory.context.version = version;
124
124
  this.accessory
@@ -203,7 +203,8 @@ export class Fan extends deviceBase {
203
203
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
204
204
  + ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
205
205
 
206
- // FirmwareRevision
206
+ // Firmware Version
207
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
207
208
  if (deviceStatus.body.version) {
208
209
  this.accessory.context.version = deviceStatus.body.version;
209
210
  this.accessory
package/src/device/hub.ts CHANGED
@@ -216,7 +216,8 @@ export class Hub extends deviceBase {
216
216
  }
217
217
  }
218
218
 
219
- // FirmwareRevision
219
+ // Firmware Version
220
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
220
221
  if (deviceStatus.body.version) {
221
222
  this.accessory.context.version = deviceStatus.body.version;
222
223
  this.accessory
@@ -268,7 +268,8 @@ export class Humidifier extends deviceBase {
268
268
  }
269
269
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} WaterLevel: ${this.HumidifierDehumidifier.WaterLevel}`);
270
270
 
271
- // FirmwareRevision
271
+ // Firmware Version
272
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
272
273
  if (deviceStatus.body.version) {
273
274
  this.accessory.context.version = deviceStatus.body.version;
274
275
  this.accessory
@@ -227,7 +227,8 @@ export class IOSensor extends deviceBase {
227
227
  this.TemperatureSensor!.CurrentTemperature = deviceStatus.body.temperature!;
228
228
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
229
229
  }
230
- // FirmwareRevision
230
+ // Firmware Version
231
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
231
232
  if (deviceStatus.body.version) {
232
233
  this.accessory.context.version = deviceStatus.body.version;
233
234
  this.accessory
@@ -325,7 +325,8 @@ export class StripLight extends deviceBase {
325
325
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Saturation: ${this.LightBulb.Saturation}`);
326
326
  }
327
327
 
328
- // FirmwareRevision
328
+ // Firmware Version
329
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
329
330
  if (deviceStatus.body.version) {
330
331
  this.accessory.context.version = deviceStatus.body.version;
331
332
  this.accessory
@@ -255,7 +255,8 @@ export class Lock extends deviceBase {
255
255
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
256
256
  + ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
257
257
 
258
- // FirmwareRevision
258
+ // Firmware Version
259
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
259
260
  if (deviceStatus.body.version) {
260
261
  this.accessory.context.version = deviceStatus.body.version;
261
262
  this.accessory
@@ -223,7 +223,8 @@ export class Meter extends deviceBase {
223
223
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
224
224
  }
225
225
 
226
- // FirmwareRevision
226
+ // Firmware Version
227
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
227
228
  if (deviceStatus.body.version) {
228
229
  this.accessory.context.version = deviceStatus.body.version;
229
230
  this.accessory
@@ -224,7 +224,8 @@ export class MeterPlus extends deviceBase {
224
224
  this.TemperatureSensor!.CurrentTemperature = deviceStatus.body.temperature!;
225
225
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
226
226
  }
227
- // FirmwareRevision
227
+ // Firmware Version
228
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
228
229
  if (deviceStatus.body.version) {
229
230
  this.accessory.context.version = deviceStatus.body.version;
230
231
  this.accessory
@@ -199,7 +199,8 @@ export class Motion extends deviceBase {
199
199
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
200
200
  + ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
201
201
 
202
- // FirmwareRevision
202
+ // Firmware Version
203
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
203
204
  if (deviceStatus.body.version) {
204
205
  this.accessory.context.version = deviceStatus.body.version;
205
206
  this.accessory
@@ -129,7 +129,8 @@ export class Plug extends deviceBase {
129
129
  }
130
130
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.Outlet.On}`);
131
131
 
132
- // FirmwareRevision
132
+ // Firmware Version
133
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
133
134
  if (deviceStatus.body.version) {
134
135
  this.accessory.context.version = deviceStatus.body.version;
135
136
  this.accessory
@@ -198,7 +198,8 @@ export class RobotVacuumCleaner extends deviceBase {
198
198
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
199
199
  + ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
200
200
 
201
- // FirmwareRevision
201
+ // Firmware Version
202
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
202
203
  if (deviceStatus.body.version) {
203
204
  this.accessory.context.version = deviceStatus.body.version;
204
205
  this.accessory
@@ -165,7 +165,8 @@ export class WaterDetector extends deviceBase {
165
165
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} LeakDetected: ${this.LeakSensor!.LeakDetected}`);
166
166
  }
167
167
 
168
- // FirmwareRevision
168
+ // Firmware Version
169
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
169
170
  if (deviceStatus.body.version) {
170
171
  this.accessory.context.version = deviceStatus.body.version;
171
172
  this.accessory
package/src/platform.ts CHANGED
@@ -1654,6 +1654,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
1654
1654
  existingAccessory.context.model = device.deviceType;
1655
1655
  existingAccessory.context.deviceID = device.deviceId;
1656
1656
  existingAccessory.displayName = device.configDeviceName || device.deviceName;
1657
+ this.warnLog(`${existingAccessory.displayName} version: ${device.version} firmware: ${device.firmware}`);
1657
1658
  if (device.version && !device.firmware) {
1658
1659
  existingAccessory.context.version = device.version;
1659
1660
  }