@switchbot/homebridge-switchbot 3.7.1-beta.20 → 3.7.1-beta.22
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 +9 -0
- package/dist/device/bot-old.d.ts.map +1 -1
- package/dist/device/bot-old.js +30 -62
- package/dist/device/bot-old.js.map +1 -1
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +8 -2
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +3 -6
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +1 -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/dist/types/bledevicestatus.d.ts.map +1 -1
- package/dist/types/devicewebhookstatus.d.ts.map +1 -1
- package/package.json +6 -8
- package/src/device/bot-old.ts +30 -68
- package/src/device/waterdetector.ts +7 -2
- package/src/irdevice/airconditioner.ts +3 -6
- package/src/platform.ts +1 -3
- package/src/settings.ts +1 -0
- package/src/types/bledevicestatus.ts +1 -5
- package/src/types/devicewebhookstatus.ts +4 -8
package/dist/platform.js
CHANGED
|
@@ -10,7 +10,7 @@ import { EveHomeKitTypes } from 'homebridge-lib/EveHomeKitTypes';
|
|
|
10
10
|
* For Testing Locally:
|
|
11
11
|
* import { SwitchBotModel } from '/Users/Shared/GitHub/OpenWonderLabs/node-switchbot/dist/index.js';
|
|
12
12
|
*/
|
|
13
|
-
import { SwitchBotModel } from 'node-switchbot';
|
|
13
|
+
import { SwitchBot, SwitchBotModel } from 'node-switchbot';
|
|
14
14
|
import { queueScheduler } from 'rxjs';
|
|
15
15
|
import { request } from 'undici';
|
|
16
16
|
import { BlindTilt } from './device/blindtilt.js';
|
|
@@ -308,7 +308,6 @@ export class SwitchBotPlatform {
|
|
|
308
308
|
async setupBlE() {
|
|
309
309
|
if (this.config.options?.BLE) {
|
|
310
310
|
await this.debugLog('setupBLE');
|
|
311
|
-
const SwitchBot = (await import('node-switchbot')).SwitchBot;
|
|
312
311
|
const switchbot = new SwitchBot();
|
|
313
312
|
if (switchbot === undefined) {
|
|
314
313
|
await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
|
|
@@ -2551,7 +2550,6 @@ export class SwitchBotPlatform {
|
|
|
2551
2550
|
// BLE Connection
|
|
2552
2551
|
async connectBLE(accessory, device) {
|
|
2553
2552
|
try {
|
|
2554
|
-
const { SwitchBot } = await import('node-switchbot');
|
|
2555
2553
|
const switchbot = new SwitchBot();
|
|
2556
2554
|
queueScheduler.schedule(async () => switchbot);
|
|
2557
2555
|
await this.debugLog(`${device.deviceType}: ${accessory.displayName} 'node-switchbot' found: ${switchbot}`);
|