@switchbot/homebridge-switchbot 1.2.6-beta.3 → 1.3.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/CHANGELOG.md +9 -0
- package/config.schema.json +11 -1
- package/dist/devices/bots.js +1 -1
- package/dist/devices/bots.js.map +1 -1
- package/dist/devices/colorbulb.d.ts +14 -2
- package/dist/devices/colorbulb.d.ts.map +1 -1
- package/dist/devices/colorbulb.js +127 -30
- package/dist/devices/colorbulb.js.map +1 -1
- package/dist/devices/curtains.js +1 -1
- package/dist/devices/curtains.js.map +1 -1
- package/dist/devices/humidifiers.js +1 -1
- package/dist/devices/humidifiers.js.map +1 -1
- package/dist/devices/indoorcam.d.ts +32 -3
- package/dist/devices/indoorcam.d.ts.map +1 -1
- package/dist/devices/indoorcam.js +92 -45
- package/dist/devices/indoorcam.js.map +1 -1
- package/dist/devices/plugs.js +1 -1
- package/dist/devices/plugs.js.map +1 -1
- package/dist/irdevices/airconditioners.js +1 -1
- package/dist/irdevices/airconditioners.js.map +1 -1
- package/dist/irdevices/airpurifiers.js +1 -1
- package/dist/irdevices/airpurifiers.js.map +1 -1
- package/dist/irdevices/cameras.js +1 -1
- package/dist/irdevices/cameras.js.map +1 -1
- package/dist/irdevices/fans.js +1 -1
- package/dist/irdevices/fans.js.map +1 -1
- package/dist/irdevices/lights.js +1 -1
- package/dist/irdevices/lights.js.map +1 -1
- package/dist/irdevices/others.js +1 -1
- package/dist/irdevices/others.js.map +1 -1
- package/dist/irdevices/tvs.js +1 -1
- package/dist/irdevices/tvs.js.map +1 -1
- package/dist/irdevices/vacuumcleaners.js +1 -1
- package/dist/irdevices/vacuumcleaners.js.map +1 -1
- package/dist/irdevices/waterheaters.js +1 -1
- package/dist/irdevices/waterheaters.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +3 -3
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +1 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/package.json +1 -1
- package/src/devices/bots.ts +1 -1
- package/src/devices/colorbulb.ts +149 -37
- package/src/devices/curtains.ts +1 -1
- package/src/devices/humidifiers.ts +1 -1
- package/src/devices/indoorcam.ts +117 -49
- package/src/devices/plugs.ts +1 -1
- package/src/irdevices/airconditioners.ts +1 -1
- package/src/irdevices/airpurifiers.ts +1 -1
- package/src/irdevices/cameras.ts +1 -1
- package/src/irdevices/fans.ts +1 -1
- package/src/irdevices/lights.ts +1 -1
- package/src/irdevices/others.ts +1 -1
- package/src/irdevices/tvs.ts +1 -1
- package/src/irdevices/vacuumcleaners.ts +1 -1
- package/src/irdevices/waterheaters.ts +1 -1
- package/src/platform.ts +5 -3
- package/src/settings.ts +1 -0
package/src/platform.ts
CHANGED
|
@@ -204,7 +204,8 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
204
204
|
|
|
205
205
|
const mergeBydeviceId = (a1: { deviceId: string; }[], a2: any[]) =>
|
|
206
206
|
a1.map((itm: { deviceId: string; }) => ({
|
|
207
|
-
...a2.find((item: { deviceId: string; }) => (
|
|
207
|
+
...a2.find((item: { deviceId: string; }) => (
|
|
208
|
+
item.deviceId.toUpperCase().replace(/[^A-Z0-9]+/g, '') === itm.deviceId.toUpperCase().replace(/[^A-Z0-9]+/g, '')) && item),
|
|
208
209
|
...itm,
|
|
209
210
|
}));
|
|
210
211
|
|
|
@@ -238,7 +239,8 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
238
239
|
|
|
239
240
|
const mergeIRBydeviceId = (a1: { deviceId: string; }[], a2: any[]) =>
|
|
240
241
|
a1.map((itm: { deviceId: string; }) => ({
|
|
241
|
-
...a2.find((item: { deviceId: string; }) => (
|
|
242
|
+
...a2.find((item: { deviceId: string; }) => (
|
|
243
|
+
item.deviceId.toUpperCase().replace(/[^A-Z0-9]+/g, '') === itm.deviceId.toUpperCase().replace(/[^A-Z0-9]+/g, '')) && item),
|
|
242
244
|
...itm,
|
|
243
245
|
}));
|
|
244
246
|
|
|
@@ -310,7 +312,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
310
312
|
this.debug(`Discovered ${device.deviceType}: ${device.deviceId}`);
|
|
311
313
|
this.createColorBulb(device);
|
|
312
314
|
break;
|
|
313
|
-
case '
|
|
315
|
+
case 'Indoor Cam':
|
|
314
316
|
this.debug(`Discovered ${device.deviceType}: ${device.deviceId}`);
|
|
315
317
|
this.createIndoorCam(device);
|
|
316
318
|
break;
|