@switchbot/homebridge-switchbot 1.15.0 → 1.15.1-beta.0

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 (48) hide show
  1. package/config.schema.json +1 -1
  2. package/dist/device/bot.d.ts.map +1 -1
  3. package/dist/device/bot.js +3 -3
  4. package/dist/device/bot.js.map +1 -1
  5. package/dist/device/colorbulb.d.ts +15 -1
  6. package/dist/device/colorbulb.d.ts.map +1 -1
  7. package/dist/device/colorbulb.js +140 -13
  8. package/dist/device/colorbulb.js.map +1 -1
  9. package/dist/device/contact.d.ts.map +1 -1
  10. package/dist/device/contact.js +8 -5
  11. package/dist/device/contact.js.map +1 -1
  12. package/dist/device/curtain.d.ts.map +1 -1
  13. package/dist/device/curtain.js +6 -2
  14. package/dist/device/curtain.js.map +1 -1
  15. package/dist/device/humidifier.d.ts.map +1 -1
  16. package/dist/device/humidifier.js +2 -1
  17. package/dist/device/humidifier.js.map +1 -1
  18. package/dist/device/lock.d.ts.map +1 -1
  19. package/dist/device/lock.js +2 -1
  20. package/dist/device/lock.js.map +1 -1
  21. package/dist/device/meter.d.ts.map +1 -1
  22. package/dist/device/meter.js +25 -14
  23. package/dist/device/meter.js.map +1 -1
  24. package/dist/device/meterplus.d.ts.map +1 -1
  25. package/dist/device/meterplus.js +2 -1
  26. package/dist/device/meterplus.js.map +1 -1
  27. package/dist/device/motion.d.ts.map +1 -1
  28. package/dist/device/motion.js +2 -1
  29. package/dist/device/motion.js.map +1 -1
  30. package/dist/device/plug.d.ts +7 -7
  31. package/dist/device/plug.d.ts.map +1 -1
  32. package/dist/device/plug.js +1 -1
  33. package/dist/device/plug.js.map +1 -1
  34. package/dist/device/striplight.d.ts.map +1 -1
  35. package/dist/device/striplight.js +7 -11
  36. package/dist/device/striplight.js.map +1 -1
  37. package/package.json +79 -79
  38. package/src/device/bot.ts +3 -3
  39. package/src/device/colorbulb.ts +169 -18
  40. package/src/device/contact.ts +9 -6
  41. package/src/device/curtain.ts +6 -2
  42. package/src/device/humidifier.ts +2 -1
  43. package/src/device/lock.ts +4 -3
  44. package/src/device/meter.ts +42 -32
  45. package/src/device/meterplus.ts +2 -1
  46. package/src/device/motion.ts +2 -1
  47. package/src/device/plug.ts +9 -9
  48. package/src/device/striplight.ts +8 -14
@@ -81,7 +81,8 @@ export class StripLight {
81
81
  .setCharacteristic(this.platform.Characteristic.Model, 'W1701100')
82
82
  .setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId!)
83
83
  .setCharacteristic(this.platform.Characteristic.FirmwareRevision, this.FirmwareRevision(accessory, device))
84
- .getCharacteristic(this.platform.Characteristic.FirmwareRevision).updateValue(this.FirmwareRevision(accessory, device));
84
+ .getCharacteristic(this.platform.Characteristic.FirmwareRevision)
85
+ .updateValue(this.FirmwareRevision(accessory, device));
85
86
 
86
87
  // get the Lightbulb service if it exists, otherwise create a new Lightbulb service
87
88
  // you can create multiple services for each accessory
@@ -195,9 +196,7 @@ export class StripLight {
195
196
  this.debugLog(`Strip Light: ${this.accessory.displayName} blue: ${JSON.stringify(blue)}`);
196
197
 
197
198
  const [hue, saturation] = rgb2hs(Number(red), Number(green), Number(blue));
198
- this.debugLog(
199
- `Strip Light: ${this.accessory.displayName} hs: ${JSON.stringify(rgb2hs(Number(red), Number(green), Number(blue)))}`,
200
- );
199
+ this.debugLog(`Strip Light: ${this.accessory.displayName} hs: ${JSON.stringify(rgb2hs(Number(red), Number(green), Number(blue)))}`);
201
200
 
202
201
  // Hue
203
202
  this.Hue = hue;
@@ -223,8 +222,7 @@ export class StripLight {
223
222
  this.errorLog(`Strip Light: ${this.accessory.displayName} failed refreshStatus with OpenAPI Connection`);
224
223
  if (this.deviceLogging.includes('debug')) {
225
224
  this.errorLog(
226
- `Strip Light: ${this.accessory.displayName} failed refreshStatus with OpenAPI Connection,` +
227
- ` Error Message: ${JSON.stringify(e.message)}`,
225
+ `Strip Light: ${this.accessory.displayName} failed refreshStatus with OpenAPI Connection,` + ` Error Message: ${JSON.stringify(e.message)}`,
228
226
  );
229
227
  }
230
228
  this.apiError(e);
@@ -281,8 +279,7 @@ export class StripLight {
281
279
  this.errorLog(`Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection`);
282
280
  if (this.deviceLogging.includes('debug')) {
283
281
  this.errorLog(
284
- `Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection,` +
285
- ` Error Message: ${JSON.stringify(e.message)}`,
282
+ `Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection,` + ` Error Message: ${JSON.stringify(e.message)}`,
286
283
  );
287
284
  }
288
285
  this.apiError(e);
@@ -325,8 +322,7 @@ export class StripLight {
325
322
  this.errorLog(`Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection`);
326
323
  if (this.deviceLogging.includes('debug')) {
327
324
  this.errorLog(
328
- `Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection,` +
329
- ` Error Message: ${JSON.stringify(e.message)}`,
325
+ `Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection,` + ` Error Message: ${JSON.stringify(e.message)}`,
330
326
  );
331
327
  }
332
328
  this.apiError(e);
@@ -354,16 +350,14 @@ export class StripLight {
354
350
  this.BrightnessCached = this.Brightness;
355
351
  } else {
356
352
  this.debugLog(
357
- `Strip Light: ${this.accessory.displayName} No Changes.` +
358
- `Brightness: ${this.Brightness}, BrightnessCached: ${this.BrightnessCached}`,
353
+ `Strip Light: ${this.accessory.displayName} No Changes.` + `Brightness: ${this.Brightness}, BrightnessCached: ${this.BrightnessCached}`,
359
354
  );
360
355
  }
361
356
  } catch (e: any) {
362
357
  this.errorLog(`Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection`);
363
358
  if (this.deviceLogging.includes('debug')) {
364
359
  this.errorLog(
365
- `Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection,` +
366
- ` Error Message: ${JSON.stringify(e.message)}`,
360
+ `Strip Light: ${this.accessory.displayName} failed pushChanges with OpenAPI Connection,` + ` Error Message: ${JSON.stringify(e.message)}`,
367
361
  );
368
362
  }
369
363
  this.apiError(e);