@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.
- package/config.schema.json +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +3 -3
- package/dist/device/bot.js.map +1 -1
- package/dist/device/colorbulb.d.ts +15 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +140 -13
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +8 -5
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +6 -2
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +2 -1
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +2 -1
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +25 -14
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +2 -1
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +2 -1
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +7 -7
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +1 -1
- package/dist/device/plug.js.map +1 -1
- package/dist/device/striplight.d.ts.map +1 -1
- package/dist/device/striplight.js +7 -11
- package/dist/device/striplight.js.map +1 -1
- package/package.json +79 -79
- package/src/device/bot.ts +3 -3
- package/src/device/colorbulb.ts +169 -18
- package/src/device/contact.ts +9 -6
- package/src/device/curtain.ts +6 -2
- package/src/device/humidifier.ts +2 -1
- package/src/device/lock.ts +4 -3
- package/src/device/meter.ts +42 -32
- package/src/device/meterplus.ts +2 -1
- package/src/device/motion.ts +2 -1
- package/src/device/plug.ts +9 -9
- package/src/device/striplight.ts +8 -14
package/src/device/striplight.ts
CHANGED
|
@@ -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)
|
|
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);
|